A simple memory allocator