Earlier quoted context omitted.
I have actually worked on a system where malloc() was forbidden. In fact it always returned null. Buffers were all statically allocated and stack usage was kept to a minimum (it was only a few kB anyways). The software was shipped with a memory map file so you know exactly what each memory address is used for. A lot of test procedures involved reading and writing at specific memory locations. It was for avionics BTW.…
Why even define a malloc() in this environment if it always returns NULL?
Never experienced the malloc() thing but do throw exceptions and fail fast under conditions like these so they're caught in testing.