Allocate a V*
free a V*
Deallocate all chunks used by this allocator.
A chunk of elements
This is the form used to link recyclable elements together.
Free is needed to recycle nodes for another allocation.
The fresh chunk. This is only used if no elements are available in the used chain.
The next element in the fresh chunk. Because we don't worry about the free list in the fresh chunk, we need to keep track of the next fresh element to use.
The chain of used chunks. Used chunks have had all their elements allocated at least once.
Allocate a chunk of elements at once, then use the chunk to return elements. This makes allocating individual elements more efficient because the GC isn't used for allocating every element, only every chunk of elements.
The only requirement is that the size of V is >= size of a pointer. This is because the data V contains is used as a pointer when freeing the element.
If an entire chunk of elements is freed, that chunk is then returned to the GC.