malloc.c
void *srealloc(void *p, size_t size) {
    void *q;
    if (p) {
	q = realloc(p, size);
    } else {
	q = malloc(size);
    }
    if (!q)
	fatal("out of memory");
    return q;
}
/*
 * srealloc should guaranteeably be able to realloc NULL
 */
srealloc should guaranteeably be able to realloc NULL
srealloc should guaranteeably be able to realloc NULL
void *srealloc(void *p, size_t size) {
    void *q;
    if (p) {
	q = realloc(p, size);
    } else {
	q = malloc(size);
    }
    if (!q)
	fatal("out of memory");
    return q;
}
void * srealloc ( void * p , size_t size ) { void * q ; if ( p ) { q = realloc ( p , size ) ; } else { q = malloc ( size ) ; } if ( ! q ) fatal ( " " ) ; return q ; }
srealloc should guaranteeably be able to realloc NULL
srealloc should guaranteeably be able to realloc NULL