Re: [Gc] Alignment/padding of small objects on 64-bit platform (x86-64)

Stefan Kral <[email protected]> Sat, 11 Oct 2014 23:39:26 +0200
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <CAKu0M1SmBwMFOjUoi7g51K7pGmk2xj_xOBrRB=iD5Yf+Cs=NQw@mail.gmail.com>
That is okay with me... At the moment the GC allocates memory in chunks of
16 bytes, so I lose 8 bytes everytime I allocate a 24 byte block.

Would lowering the granule size to 8 bytes likely cause any problems? (If
most of my allocations are small...)

Regards, Stefan.
On Oct 11, 2014 11:31 PM, "Bruce Hoult" <[email protected]> wrote:

> The GC needs to store a pointer for a free list, so needs at least 8 bytes
> per object. And aligned on most CPUs.
>
> On Sunday, October 12, 2014, Stefan Kral <[email protected]> wrote:
>
>> Hello.
>>
>> My app operates on a lot of 3-word objects and I wonder if it would be
>> reasonable to adapt the granule size accordingly.
>>
>> The application requires 64-bit pointers and has no double-word alignment
>> requirements, so I would be keen on reducing the memory requirement.
>>
>> I'm grateful for any advise and/or tips!
>>
>> Best Regards,
>> Stefan.
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and
>> is
>> believed to be clean.
>
>

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc