26 reroot *r = (reroot *)remalloc(
sizeof(reroot),
"recycle.c, root");
27 r->list = (recycle *)0;
28 r->trash = (recycle *)0;
29 r->size = mdbalign(size);
35void refree(r)
struct reroot *r;
38 if ((temp = r->list) != NULL)
41 free((
char *)r->list);
49char *renewx(r)
struct reroot *r;
54 r->trash = temp->next;
55 (void)memset((
void *)temp, 0, r->size);
57 r->numleft = r->size * ((ub4)1 << r->logsize);
58 if (r->numleft < REMAX)
60 temp = (recycle *)remalloc(
sizeof(recycle) + r->numleft,
"recycle.c, data");
63 r->numleft -= r->size;
64 temp = (recycle *)((
char *)(r->list + 1) + r->numleft);
69char *remalloc(len, purpose)
73 char *x = (
char *)malloc(len);
75 fprintf(stderr,
"malloc of %d failed for %s\n", (
int)len, purpose);