[Asterisk-code-review] pjproject: Improve MALLOC DEBUG checking. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Fri Feb 23 19:33:00 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/8288 )

Change subject: pjproject: Improve MALLOC_DEBUG checking.
......................................................................


Patch Set 1:

> > > Instead of doing this as a pjproject patch, can we do it in
 > > > res_pjsip/load_pjsip instead?  Maybe use their pool_dbg?

Unfortunately, pool_dbg and the caching_pool are currently mutually
exclusive compile time selections.  You can have one or the other.
You cannot select these pools at run time.

 > >
 > > If this can be accomplished at runtime I think that would be
 > > better.  This would allow use of an option like cache_media_frames
 > > to disable pool caching for use with valgrind (without needing
 > > MALLOC_DEBUG).

Yes.  That would be nice.

 > 
 > Another option might be to simply clone the cached pool factory as
 > a non-cached version and submit it upstream.  Then add a
 > pjsip.conf/system option to use the cached or non-cached memory
 > pool factory.

I suppose I could create a non-cached pool factory patch for bundled.
Creating that pool isn't that bad.  The complexity comes in detecting
the pool's availability and selecting it when requested.

We shouldn't send it upstream because this is to allow MALLOC_DEBUG
or valgrind visibility into the bundled pjproject's memory usage.  An
external pjproject adds unnecessary detection complexity when they
can already build pjproject and asterisk with the dbg_pool for use
with valgrind.  Though, there might be some compiler warnings about
some cache related unused variables in asterisk.


-- 
To view, visit https://gerrit.asterisk.org/8288
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
Gerrit-Change-Number: 8288
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Sat, 24 Feb 2018 01:33:00 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180223/089b80cf/attachment-0001.html>


More information about the asterisk-code-review mailing list