Fixing a Tough Memory Leak In Python
Even if you don’t use Python, the techniques are sound. We identified the C call stack where memory is allocated,
LD_PRELOAD a custom library to raise a signal when this stack is encountered.
Thread Local Storage(TLS)
Ruby or Python or language with thread support has a concept of TLS...