26 memset(rv, 0, nbytes);
30 void *
zrealloc(
void *ptr,
size_t size,
size_t elt,
size_t osize)
32 void *p = realloc(ptr, size * elt);
33 if (p ==
NULL && size) {
34 fprintf(stderr,
"out of memory\n");
38 memset((
char *) p + (osize * elt),
'\0', (size - osize) * elt);
49 fprintf(stderr,
"out of memory\n");
56 void *p = realloc(ptr, size);
57 if (p ==
NULL && size) {
58 fprintf(stderr,
"out of memory\n");
void * zmalloc(size_t nbytes)
void * grealloc(void *ptr, size_t size)
void * gmalloc(size_t nbytes)
void * zrealloc(void *ptr, size_t size, size_t elt, size_t osize)