GetMem and memory alignment ?



Hello,

Does GetMem always align memory ?

Also what is it's alignment ?

4 bytes or 8 bytes ?

Assumption is fastmem is being used as the memory manager.

Some other questions:

What is best alignment for:

Pentium 166
Pentium III 450 mhz
AMD X2 3800+.

Maybe each computer needs a different memory alignment for optimal
performance ?

So maybe programs could benefit by examining the type of the processor and
the memory and then adjust accordingly to best settings.

Bye,
Skybuck.


.



Relevant Pages

  • Re: What factors influence required memory alignment?
    ... preventing such alignment on DOUBLE PRECISION operands. ... point values are packed into a single register and/or memory location. ... The ability to trap misaligned accesses was added to various x86 ... Its slightly easier to catch bugs when an odd address read immediately ...
    (comp.arch)
  • Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs
    ... raw memory bandwidth is governed by RAS cycles. ... This means that the more data you can load into the cpu on the 'read' ... Alignment is critical. ...
    (freebsd-arch)
  • Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs
    ... raw memory bandwidth is governed by RAS cycles. ... This means that the more data you can load into the cpu on the 'read' ... Alignment is critical. ...
    (freebsd-current)
  • Re: traumatized by pointer casting
    ... >> When you cast the array by name to a pointer to struct, ... structure, and after the last member, just not before the first ... the entire structure a multiple of the alignment size. ... That is why the memory allocation functions malloc(), calloc, ...
    (comp.lang.c)
  • Re: A malloc question
    ... reliably store 100 chars followed by a struct in this memory, ... the alignment of p+100 may not be suitable for the struct. ... the paddings for memory alignment are ... malloc() will see a request of 24 byte allocation. ...
    (comp.lang.c)