Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however.
To this end I have created numerous:
#ifdef DEBUG
fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr);
#endif
So I just need to match these ptr addresses that are displayed with the addresses of non-freed memory.
How can I get valgrind to tell me the address of each non-freed block of memory?