direalloc(void * x,size_t size,char * name,int line)1void *direalloc (/*@out@*/ /*@null@*/ void *x, size_t size, 2 char *name, int line) 3 { 4 void *ret; 5 6 if (x == NULL) 7 { 8 ret = (void *) dmalloc (size); 9 } 10 else 11 { 12 ret = (void *) realloc (x, size); 13 } 14 15 if (ret == NULL) 16 { 17 llfatalerrorLoc 18 (message ("Out of memory. Allocating %w bytes at %s:%d.", 19 size_toLongUnsigned (size), 20 cstring_fromChars (name), line)); 21 } 22 23 return ret; 24 } 25