10 ms·
Define "more naive allocation algorithm".
by TheLoneWolfling 11y ago
Define "more naive allocation algorithm".
- eutectic 11y agoWhat about bump-pointer + maintaining a count of live allocations?
- TheLoneWolfling 11y agoThat won't work if you ever want to deallocate things - which, given that due to the compressed arrays you have to deallocate to add elements (deallocate the old array with <0,1,2,3> elements, allocate a new with <1,2,3,4> elements), won't work for this.
- eutectic 11y agoYou can deallocate if you use small enough chunks, although you might need to use some other strategies to minimize fragmentation.
- TheLoneWolfling 11y agoIf you're using "small enough chunks" your space overhead balloons to the point where you may as well not use it.