a memory allocator in C