version 1.3, 2005/12/19 18:21:31 |
version 1.4, 2005/12/30 17:51:01 |
|
|
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 %lu bytes)", (u_long) size); |
fatal("xmalloc: out of memory (allocating %lu bytes)", |
|
(u_long) size); |
return ptr; |
return ptr; |
} |
} |
|
|
|
|
else |
else |
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 %lu bytes)", (u_long) new_size); |
fatal("xrealloc: out of memory (new_size %lu bytes)", |
|
(u_long) new_size); |
return new_ptr; |
return new_ptr; |
} |
} |
|
|