27 #define NEW(t) (t*)calloc(1,sizeof(t))
28 #define N_NEW(n,t) (t*)calloc((n),sizeof(t))
29 #define GNEW(t) (t*)malloc(sizeof(t))
30 #define N_GNEW(n,t) (t*)malloc((n)*sizeof(t))
31 #define ALLOC(size,ptr,type) (ptr? (type*)realloc(ptr,(size)*sizeof(type)):(type*)malloc((size)*sizeof(type)))
32 #define RALLOC(size,ptr,type) ((type*)realloc(ptr,(size)*sizeof(type)))
33 #define ZALLOC(size,ptr,type,osize) (ptr? (type*)recalloc(ptr,(size)*sizeof(type)):(type*)calloc((size),sizeof(type)))
35 #define NEW(t) (t*)zmalloc(sizeof(t))
36 #define N_NEW(n,t) (t*)zmalloc((n)*sizeof(t))
37 #define GNEW(t) (t*)gmalloc(sizeof(t))
39 #define N_GNEW(n,t) (t*)gmalloc((n)*sizeof(t))
40 #define N_GGNEW(n,t) (t*)malloc((n)*sizeof(t))
41 #define ALLOC(size,ptr,type) (ptr? (type*)grealloc(ptr,(size)*sizeof(type)):(type*)gmalloc((size)*sizeof(type)))
42 #define RALLOC(size,ptr,type) ((type*)grealloc(ptr,(size)*sizeof(type)))
43 #define ZALLOC(size,ptr,type,osize) (ptr? (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))
46 #define extern __declspec(dllexport)
50 #define extern __declspec(dllimport)
57 extern void *
zrealloc(
void *,
size_t,
size_t,
size_t);
59 extern void *
grealloc(
void *,
size_t);
void * zmalloc(size_t nbytes)
void * grealloc(void *ptr, size_t size)
void * gmalloc(size_t nbytes)
void * zrealloc(void *ptr, size_t size, size_t elt, size_t osize)