/* // Graceful version of malloc(). */ #include "matrix.h" void *gmalloc(size_t n) { void *p; if ((p = malloc(n)) == NULL) { fprintf(stderr, "\n%s%u%s\n\n", "WHOOPS: The function call malloc(", n, ") failed - bye!"); exit(1); } return p; }