Also worth noting: under normal conditions on Linux, malloc will never fail--unless you set something like a rlimit on address space, mmap will happily hand you as much address space as you want, then OOM-kill you (or worse, someone else...) when you try to make it resident. So even if we could write malloc-failure-safe software, which we can't, it'd be almost impossible to end up in that condition.