C++ Advanced · exercise 02
Custom allocators & pools
Hand out memory from a fixed arena with no heap traffic.
C++ Advanced lesson 02Guided steps
- 1.Return a pointer into the buffer and advance the offset by the requested size.
- 2.Return nullptr when the arena is exhausted instead of falling back to the heap.
- 3.Print how many bytes were handed out.
Your code
Your code is saved in this browser after every run and restored next time.