1 /* 2 * MEMEXTRA.H 3 * 4 * Written 1995-1996 by Andrew Clarke and released to the public domain. 5 * 6 * Memory allocation routines with core exhaust checking. 7 */ 8 9 #ifndef __MEMEXTRA_H__ 10 #define __MEMEXTRA_H__ 11 12 #include <stdlib.h> /* size_t */ 13 14 void *xmalloc(size_t size); 15 void *xcalloc(size_t nmemb, size_t size); 16 void *xrealloc(void *ptr, size_t size); 17 char *xstrdup(const char *str); 18 void xfree(void *ptr); 19 20 #ifdef OS2 21 void xfree16(void *ptr); 22 void* xmalloc16(size_t size); 23 #endif 24 25 #endif 26