As explain at https://www.kamailio.org/wiki/tutorials/troubleshooting/memory#pkg_with_syst... valgrind can be used to check memory leaks if kamailio is compiled without ``*_MALLOC``.
I would like to support valgrind even if kamailio is compiled to use its own memory managers. In order to archive this, valgrind has to be informed of how those managers control the memory as described at http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools