I have a really odd problem that I described here. I try to get my head around this issue and came across this in memory.h:
#define NEW(t) (t*)zmalloc(sizeof(t))
#define N_NEW(n,t) (t*)gcalloc((n),sizeof(t))
#define GNEW(t) (t*)gmalloc(sizeof(t))
#define N_GNEW(n,t) (t*)gcalloc((n),sizeof(t))
#define N_GGNEW(n,t) (t*)calloc((n),sizeof(t))
and later:
extern void *zmalloc(size_t);
extern void *zrealloc(void *, size_t, size_t, size_t);
extern void *gcalloc(size_t nmemb, size_t size);
extern void *gmalloc(size_t);
extern void *grealloc(void *, size_t);
I am not really into this memory allocation business (spoiled by the likes of Java and Swift), but what are we doing here? Why so many new versions? Why always so inspirational names? Can these even work with each other? Should we try to harmonise?