<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8366">View Change</a></p><p>Patch set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">(1 comment)</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">This may be crazy but how much of a performance hit would we take<br>if __ast_calloc et al were always real functions provided by<br>main/astmm.c instead of AST_INLINE_API in utils.h?  Then just have<br>the implementation of main/astmm.c chosen by `#if defined(MALLOC_DEBUG)`.<br> I know there would be a hit, I'm just not sure it's prohibitive.</pre></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I'd like to do that since it would reduce the inline code bloat.  However,<br>something would need to be done about the varying definitions of<br>MALLOC_FAILURE_MSG.  That would need to be another patch though.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I do think we overuse inline functions.  They are supposed to provide<br>benefit when the overhead of calling a function is more than the<br>time needed to execute the function itself.  This means that inlined<br>functions should be tiny.  e.g., Value accessor functions.</p><p>(2 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8366/1/include/asterisk/utils.h">File include/asterisk/utils.h:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8366/1/include/asterisk/utils.h@536">Patch Set #1, Line 536:</a> <code style="font-family:monospace,monospace">#define ast_free free</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Wouldn't this still be a problem if MALLOC_DEBUG is enabled on the core and</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You did notice the comment about 10 lines above right?</p><p style="white-space: pre-wrap; word-wrap: break-word;">"Need to defeat the MALLOC_DEBUG API when building the standalone utilities."</p><p style="white-space: pre-wrap; word-wrap: break-word;">This section of code is only present when we are building those deservedly maligned applications in the utils directory.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8366/1/include/asterisk/utils.h@536">Patch Set #1, Line 536:</a> <code style="font-family:monospace,monospace">#define ast_free free</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Looking further this is a problem:</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't understand what you are trying to say here.  This code is only present when we are building the standalone applications in the utils directory.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8366">change 8366</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8366"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10 </div>
<div style="display:none"> Gerrit-Change-Number: 8366 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 22 Feb 2018 17:41:03 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>