version 1.13, 2001/02/07 16:46:08 |
version 1.14, 2001/02/07 18:04:50 |
|
|
fatal("xmalloc: zero size"); |
fatal("xmalloc: zero size"); |
ptr = malloc(size); |
ptr = malloc(size); |
if (ptr == NULL) |
if (ptr == NULL) |
fatal("xmalloc: out of memory (allocating %d bytes)", (int) size); |
fatal("xmalloc: out of memory (allocating %lu bytes)", (u_long) size); |
return ptr; |
return ptr; |
} |
} |
|
|
|
|
fatal("xrealloc: NULL pointer given as argument"); |
fatal("xrealloc: NULL pointer given as argument"); |
new_ptr = realloc(ptr, new_size); |
new_ptr = realloc(ptr, new_size); |
if (new_ptr == NULL) |
if (new_ptr == NULL) |
fatal("xrealloc: out of memory (new_size %d bytes)", (int) new_size); |
fatal("xrealloc: out of memory (new_size %lu bytes)", (u_long) new_size); |
return new_ptr; |
return new_ptr; |
} |
} |
|
|