2 * memory routines to ease garbage collection when errors occur
10 #include <exec/types.h>
14 void *emalloc(n
) /* check return from malloc() */
17 extern void execerror(char *, char *);
20 if ((p
= malloc(n
)) == NULL
)
21 execerror("out of memory", NULL
);
26 RemKey
**rem_setkey(k
) /* set key to be used for malloc's */
29 RemKey
**oldkey
= gkey
;
34 void *rem_malloc(size
) /* allocate memory, tag to list */
39 k
= emalloc(sizeof(RemKey
));
40 k
->ptr
= emalloc(size
);
47 void rem_freeall() /* free all memory associated with a key */
61 /* just free 'remember' info */
62 /* not being used in current implementation */