On Linux, malloc doesn’t necessarily return a null pointer if you’re out of memory. You might get back a pointer and then have the OOM killer start eating processes if you’re really out of memory. Is the same true for c++’s operator new or will you get the bad_alloc exception?
On Linux, malloc doesn’t necessarily return a null pointer if you’re out of memory.
Share
The same is true for operator new, alas :^(