Allocate a T*
free a T*
Deallocate all chunks used by this allocator. Depends on the GC to do the actual collection
A chunk of elements
This is the form used to link recyclable elements together.
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.
GCChunk allocator
Like the Chunk allocator, this allocates elements in chunks, but allows you to allocate elements that can have GC pointers.
Tests have shown about a 60% speedup when using the GC chunk allocator for a Hashmap!(int, int).