added memory allocator design in C