sophiajt / june

MIT License
803 stars 31 forks source link

New allocator #3

Closed sophiajt closed 11 months ago

sophiajt commented 11 months ago

This swaps out the old allocator for one that's a bit more efficient. This allocator does a few things differently than the old one:

The new allocator has an optional DEBUG_ZEROING flag to help with catching out bad allocation lifetimes in the unit tests (similar to the old allocator)

A quick test reveals that this allocator, in a hot loop of allocating and freeing a block of memory, is roughly 2x faster than system malloc/free. Though this is just one benchmark.