<p>One approach to this feature would have been to create some callbacks to update the memory stats, called by malloc/realloc/free functions. This approach would have been questionable because processing has to be done each time somememory functions were called.<br>
The current approach is to export some memory api functions (something similar to q_sums) which will itereate through the memory fragments and agregate their size. The kamcmd callback will call those functions and print the agregated results.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/225#issuecomment-116713520">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWLzdvwu6E4Ig5C9RQHGdYQjKdBaks5oYVK8gaJpZM4FOLp0.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/225#issuecomment-116713520"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>