diff -r c2f4c0285180 -r f600b0d1fc5d bl/mem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bl/mem.h Fri Jan 27 10:30:16 2012 +0000 @@ -0,0 +1,13 @@ +#ifndef BL_MEM_H +#define BL_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 /* BL_MEM_H */