Very simple memory allocator for learning pointer