Re: [Gc] Alignment/padding of small objects on 64-bit platform (x86-64)
Bruce Hoult <[email protected]> Sun, 12 Oct 2014 11:13:41 +1300
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <CAMU+EkwQ9O4Z5m7Jr1kj2PMg9kkznUOV8FPUaroPru1O5H+g8Q@mail.gmail.com> |
It would be a definite bug if it didn't work with 8 bytes. Some support data structures might use a bit more space. On Sunday, October 12, 2014, Stefan Kral <[email protected]> wrote: > 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] > <javascript:_e(%7B%7D,'cvml','[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] >> <javascript:_e(%7B%7D,'cvml','[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. >> >> > -- > 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