My version of a memory allocator.