profiling memory - what should we use
cperciva: What are you using to test memory leaks?I'm not suggesting that this is a good approach or that anyone else should use it, but... I run with ktrace and with MALLOC_OPTIONS=U set in the environment.  This logs every single call to malloc(), realloc(), and free(); I then throw the log files at a perl script which matches up allocations with frees and gives me a list of every time memory was allocated without being subsequently freed.Of course, this is only feasible because I'm working in C; and I'm sure there are better tools available if I could be bothered to learn how to use them.