64#ifdef RAVE_MEMORY_DEBUG
68#define RAVE_MALLOC(sz) rave_alloc_malloc(__FILE__, __LINE__, sz)
73#define RAVE_CALLOC(npts,sz) rave_alloc_calloc(__FILE__, __LINE__, npts, sz)
78#define RAVE_REALLOC(ptr, sz) rave_alloc_realloc(__FILE__, __LINE__, ptr, sz)
83#define RAVE_STRDUP(x) rave_alloc_strdup(__FILE__, __LINE__, x)
88#define RAVE_FREE(x) if (x != NULL) {rave_alloc_free(__FILE__, __LINE__, x); x=NULL;}
94#define RAVE_MALLOC(sz) malloc(sz)
99#define RAVE_CALLOC(npts,sz) calloc(npts, sz)
104#define RAVE_REALLOC(ptr, sz) realloc(ptr, sz)
109#define RAVE_STRDUP(x) strdup(x)
114#define RAVE_FREE(x) if (x != NULL) {free(x);x=NULL;}
char * rave_alloc_strdup(const char *filename, int lineno, const char *str)
Same as strdup but debugged.
Definition rave_alloc.c:264
void rave_alloc_free(const char *filename, int lineno, void *ptr)
Releases the memory.
Definition rave_alloc.c:291
void rave_alloc_print_statistics(void)
Prints the statistics for the heap.
Definition rave_alloc.c:336
void rave_alloc_dump_heap(void)
Dumps all blocks that not has been released.
Definition rave_alloc.c:317
void * rave_alloc_calloc(const char *filename, int lineno, size_t npts, size_t sz)
Same as calloc but debugged.
Definition rave_alloc.c:216
void * rave_alloc_realloc(const char *filename, int lineno, void *ptr, size_t sz)
Same as realloc but debugged.
Definition rave_alloc.c:236
void * rave_alloc_malloc(const char *filename, int lineno, size_t sz)
Allocates memory and keeps track on if it is released, overwritten and similar.
Definition rave_alloc.c:202