How would you design and implement a custom memory allocator (malloc and free) for an embedded system with highly fragmented SRAM?