Dan wrote: >># In lieu of a de-allocator for mem_allocate_aligned I vote >># we at least do something in the interim and I volunteer to >># help as soon as someone decides what it is! >> >>Maybe we can have a mem_free_aligned that somehow figures out what the >>starting address is. If we do that and document which data structures >>are aligned and which aren't, we shouldn't have a problem. > >You can't do that--there's no way to tell where the memory block really >started.
Right, at least while everyone is allocating memory by multiple methods. Too bad free() is too dumb() :), some mem management libs I recall use some magic cookie values to validate, hidden in a negative offset of the chunk, but apparently we can't rely on that. > >Anyway, all the aligned stuff's a bit of a hack-up to make up for the lack >of arenas. It'll be fixed right reasonably soon. > >Dan Cheer! -Melvin