[Asterisk-code-review] core: Remove ABI effects of MALLOC DEBUG. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Fri Feb 23 06:47:59 CST 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/8366 )

Change subject: core: Remove ABI effects of MALLOC_DEBUG.
......................................................................


Patch Set 2:

> (2 comments)
 > 
 > > (1 comment)
 > >
 > > This may be crazy but how much of a performance hit would we take
 > > if __ast_calloc et al were always real functions provided by
 > > main/astmm.c instead of AST_INLINE_API in utils.h?  Then just
 > have
 > > the implementation of main/astmm.c chosen by `#if
 > defined(MALLOC_DEBUG)`.
 > >  I know there would be a hit, I'm just not sure it's prohibitive.
 > 
 > I'd like to do that since it would reduce the inline code bloat. 
 > However,
 > something would need to be done about the varying definitions of
 > MALLOC_FAILURE_MSG.  That would need to be another patch though.
 > 
 > I do think we overuse inline functions.  They are supposed to
 > provide
 > benefit when the overhead of calling a function is more than the
 > time needed to execute the function itself.  This means that
 > inlined
 > functions should be tiny.  e.g., Value accessor functions.

I just wrote a follow-up patch to remove all allocation AST_INLINE_API functions from utils.h and put them into astmm.c.  I will post once this review is merged, I just wanted to mention this now so you do not duplicate the work I've done.


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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
Gerrit-Change-Number: 8366
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 23 Feb 2018 12:47:59 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180223/4a41149a/attachment.html>


More information about the asterisk-code-review mailing list