In C++, you should do nothing beyond using throwing operator new. In C, most code uses a malloc function that aborts the application when it fails, for good or for ill. OTOH, that's not really a good ...