Design and implement a basic memory allocator (malloc and free equivalents) for a block of static memory.