I've been experimenting with using mmapped files as storage. One thing that I'm trying out is writing variable sized records to an mmapped file. However, I'll also be supporting deletions and updates, so fragmentation can become a big problem. Moreover, there could be records written at different times that need to be physically "colocated" for efficiency.<p>My question is, are there good resources to get started on working on on-disk allocators? I don't want to get there in a day, but need a solid direction. Thanks!
I collected some links to interesting and useful links about allocators here <a href="https://github.com/rain-1/awesome-allocators" rel="nofollow">https://github.com/rain-1/awesome-allocators</a><p>I think you would look into bitmap based allocators (which only handles fixed size allocations, but it's very simple) and then (more advanced) binary buddies system to start with.<p>* <a href="http://sean.cm/a/tricolor-garbage-collector" rel="nofollow">http://sean.cm/a/tricolor-garbage-collector</a><p>* <a href="http://www.memorymanagement.org/mmref/alloc.html" rel="nofollow">http://www.memorymanagement.org/mmref/alloc.html</a>