, , . , .
The standard in C applications is to write a function void xmalloc(size_t size);that will check the return value of malloc, and if NULL, print an error for stderr, and then call the abort () function. That way you just use xmallocin all your code and donโt think about it. If you run out of memory, luck and your application will die.
source
share