[fpc-devel] CMem allocator memory alignment experiment
Florian Klaempfl
florian at freepascal.org
Sun Nov 23 10:59:11 CET 2014
Am 19.11.2014 12:32, schrieb Karoly Balogh (Charlie/SGR):
> Hi,
>
> On Wed, 19 Nov 2014, Jonas Maebe wrote:
>
>>> Since the RTL's allocator is documented to align to 16 bytes
>>
>> Where?
>
> Ok, that's actually a very good question. :) I didn't find it anywhere,
> except some earlier ML/forum posts revealed by Google.
>
> However, in practice it still seems to align to 16 bytes, and I asked
> several people (compiler, RTL, Lazarus developers) during the FPC/Lazraus
> conference last weekend in the Netherlands and the consensus was, it's
> known the heap manager aligns to 16 bytes, it's designed to do that, and
> in general it's a feature, which should be documented if it's not.
>
> But yeah, everyone appended "but better ask Jonas". :)
>From heap.inc:
{ we need to align the user pointers to 8 byte at least for
mmx/sse and doubles on sparc, align to 16 bytes }
Cryptic though :)
More information about the fpc-devel
mailing list