4 ms·
I feel like this could also be fixed by a simple algorithm to keep track of the start index in FixBufAlloc.
by toxik 4y ago
I feel like this could also be fixed by a simple algorithm to keep track of the start index in FixBufAlloc.
- masklinn 4y agoNot 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.
- toxik 4y agoTo fix it completely yes, but to fix it sufficiently for the author I think this would be okay