author | ali <ali@juiblex.co.uk> |
Fri Jan 27 10:30:16 2012 +0000 (2012-01-27) | |
changeset 5 | f600b0d1fc5d |
parent 0 | gclib/mem.h@c2f4c0285180 |
permissions | -rw-r--r-- |
1 #ifndef BL_MEM_H
2 #define BL_MEM_H
4 void *mem_alloc(size_t nmemb,size_t size);
5 void *mem_alloc0(size_t nmemb,size_t size);
6 void *mem_realloc(void *ptr,size_t nmemb,size_t size);
8 #define mem_new(type,n) ((type *)mem_alloc(n,sizeof(type)))
9 #define mem_new0(type,n) ((type *)mem_alloc0(n,sizeof(type)))
10 #define mem_renew(type,ptr,n) ((type *)mem_realloc(ptr,n,sizeof(type)))
11 #define mem_free(ptr) free(ptr)
13 #endif /* BL_MEM_H */