/* xmalloc.m * * A version of xmalloc that rases the Objective-C error xmalloc_error * if memory allocation fails. */ #include void * xmalloc(size_t size) { register void *value = malloc (size); if (value == NULL) { if (xmalloc_error) [xmalloc_error raise]; fprintf(stderr, "virtual memory exhausted"); abort(); } return value; }