Going to try and move more of the heap allocation logic to use the stack instead by reusing buffers that has been written to disk