#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 */