Basic stack allocator written in C++