diff -r 000000000000 -r ec364358631b gclib/mem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gclib/mem.h Thu Jan 26 23:35:52 2012 +0000 @@ -0,0 +1,13 @@ +#ifndef GC_MEM_H +#define GC_MEM_H + +void *mem_alloc(size_t nmemb,size_t size); +void *mem_alloc0(size_t nmemb,size_t size); +void *mem_realloc(void *ptr,size_t nmemb,size_t size); + +#define mem_new(type,n) ((type *)mem_alloc(n,sizeof(type))) +#define mem_new0(type,n) ((type *)mem_alloc0(n,sizeof(type))) +#define mem_renew(type,ptr,n) ((type *)mem_realloc(ptr,n,sizeof(type))) +#define mem_free(ptr) free(ptr) + +#endif /* GC_MEM_H */