Wrapper library for malloc
A very simple library for detecting memory allocations in C programs that aren't freed (e.g. memory leaks). Useful while learning C, but not intended for production code.To use it, prefix all calls to malloc, calloc, realloc, strdup and free with w_ and set the symbol USE_W_MALLOC. If it is not set, it defaults to standard C library functions. Then simply free all allocations. Non-freed allocations are reported by the function checkForLeaks(), teasingly slow so the programmer is encouraged to fix his or her mistakes immediately.
