[sr-dev] Per module memmory consumption

smititelu stefan.mititelu at 1and1.ro
Wed Jun 17 11:19:58 CEST 2015


>> If you think of some other solution or have some advices for this, 
>> please comment.
> This has to be done as add on to the memory manager via a module, 
> something similar to what rpc command pkg.stats does, using some 
> callbacks, to be sure it is not slowing down the core when this 
> feature is not wanted/enabled.
>
> Perhaps an array with the shm and pkg counters, updated on callbacks 
> for *malloc/*realloc/*free, still *relying on module name stored in 
> the memory chunk structure at malloc time,* in order to decrease it 
> properly at free time.
Are you referring to the #define _SRC_LOC_ *_SRC_MODULE_* ": " 
_SRC_FILENAME_ used at the moment when kamailio is compiled with 
MEMDBG=1? Besides this, I could find nothing related to a module name in 
any memory chunk structure.

> When coding the feature, it would be good to add it in between #ifdef 
> ... #endif to be able to do performance measurments and disable it 
> completely if has big impact. It has relevance for profiling and would 
> be useful to have, just to be sure is not slowing down a lot.
I shall keep that in mind.


Thanks for your prompt response.

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150617/d9204a2b/attachment.html>


More information about the sr-dev mailing list