Hacker News new | ask | show | jobs
by toxik 1184 days ago
I feel like this could also be fixed by a simple algorithm to keep track of the start index in FixBufAlloc.
1 comments

Not really. If you allocate a bunch of objects then deallocate one in the middle of the sequence neither head or tail will help you. And once you’ve done that you’ve hit holes you can’t track anymore.

To fix this issue you need a completely different allocator design, e.g. a bitmap, which can keep track of individual locations within its buffer.

To fix it completely yes, but to fix it sufficiently for the author I think this would be okay