1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/bl/mem.h Fri Jan 27 10:30:16 2012 +0000
1.3 @@ -0,0 +1,13 @@
1.4 +#ifndef BL_MEM_H
1.5 +#define BL_MEM_H
1.6 +
1.7 +void *mem_alloc(size_t nmemb,size_t size);
1.8 +void *mem_alloc0(size_t nmemb,size_t size);
1.9 +void *mem_realloc(void *ptr,size_t nmemb,size_t size);
1.10 +
1.11 +#define mem_new(type,n) ((type *)mem_alloc(n,sizeof(type)))
1.12 +#define mem_new0(type,n) ((type *)mem_alloc0(n,sizeof(type)))
1.13 +#define mem_renew(type,ptr,n) ((type *)mem_realloc(ptr,n,sizeof(type)))
1.14 +#define mem_free(ptr) free(ptr)
1.15 +
1.16 +#endif /* BL_MEM_H */