2 * \file src/free_atexit.c
6 * This tiny library is to assist cleaning up harmless memory leaks
7 * caused by (growing) buffers allocated in static variables in
9 * The library provides leaky_ prefixed variants of the common
10 * allocation routines.\n
11 * These wrappers will remember all pointers they return and can free
12 * all memory used, at the end of the application.
19 #define leaky_uninit()
20 #define leaky_malloc(size) malloc(size)
21 #define leaky_calloc(nmemb, size) calloc(nmemb, size)
22 #define leaky_realloc(old_memory, size) realloc(old_memory, size)
25 void leaky_init (void);
26 void leaky_uninit (void);
27 void *leaky_malloc (size_t size
);
28 void *leaky_calloc (size_t nmemb
, size_t size
);
29 void *leaky_realloc (void* old_memory
, size_t size
);