Your memory manager should satisfy the following design goals:
- User convenience
The memory manager must be faster than the compiler-provided allocators. Repeated allocations and deallocations should not slow down the code. If possible, the memory manager should be optimized for handling certain allocation patterns that occur frequently in the code.
The memory manager must return all the memory it requested to the system before the program terminates. That is, there should be no memory leaks. It should also be able to handle erroneous cases (for example, requesting too large a size) and bail out gracefully.
Users should need to change only a minimal amount of code when integrating the memory manager into their code.
The memory manager should be easily portable across systems and not use platform-dependant memory management features.