Also if the goal is to get one chunk of memory with a single call, why use malloc at all? Why not use the direct memory mapping command?
Under that system malloc/new was just a pointer bump, and an assert if there wasn't enough room. Free wasn't linked, and delete asserted. That heap region (or mine had several heaps that lived in different memory with different characteristics that could be specified with a new overload) is way easier to define in your linker.
There are differences of course, but that memory can be used in the same way, and so memory pools are orthogonal to how the memory is aquired.
The unit of reuse that defines the type, example: http://c-faq.com/struct/sd1.html
We wrote the system I mentioned above (128K of RAM, 256K of flash) without it, I agree, you can do everything you need without malloc when you're careful.
Unfortunately we had a third party dependency that required a malloc implementation to be able to run, so we had to implement a simple one.
We ran into the same thing. Some open source compression code I wanted to use had malloc, dumped it for something else that didn't. Luckily we found a protobuffers instance that didn't use malloc, that saved some time on a different project.
First thing I do now when looking at example or source we might want to use is a quick scan for malloc.
Sometimes you don't get to choose or do it yourself, more's the pity!
I’m fairly happy that mirsa C forbids malloc. I can’t use it even if I wanted to, so I need to be more careful about how memory is used. Annoying at first, makes a lot of sense later on though.