I'm currently trying to write a 2D scene graph in C and I need to decide how to save the child nodes. I expect a lot of readings and writes a little, so the linked list is out of the question due to the poor spatial locality of the link, and using realloc every time to add a child node, it may fragment the free list into oblivion, Pool allocator, by seems to be the best solution, but I cannot find any implementations to use. Does anyone know of a distributor that would efficiently handle random distributions and releases from hundreds of small struct s, or perhaps a better distribution scheme?
c memory-management arrays dynamic
Electro
source share