delorie.com/archives/browse.cgi | search |
> Then perhaps we should always align on 8-byte boundary; GCC already > does that for the stack. Since malloc rounds the allocation size to > an integral multiple of 8, it sounds like making sure every allocation > is 8-byte aligned should boil down to forcing a suitable alignment of > the beginning of every contiguous chunk returned by sbrk. It also means that the overhead between chunks must be a multiple of 8, or at least that the size is rounded up so that size+overhead is a multiple of 8. And I think it's only the non-contiguous sbrks we need to align, since for contiguous ones we just attach them to the previous sbrk.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |