[Asterisk-code-review] core: Stop using AST INLINE API for allocator functions. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Wed Mar 14 15:06:45 CDT 2018


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

Change subject: core: Stop using AST_INLINE_API for allocator functions.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/8521/2/main/astmm.c
File main/astmm.c:

https://gerrit.asterisk.org/#/c/8521/2/main/astmm.c@1557
PS2, Line 1557: void *__ast_calloc(size_t nmemb, size_t size, const char *file, int lineno, const char *func)
> You have reverted part of the improvement I did with the always MALLOC_DEBU
Hmm it hadn't clicked in that your patch did that.  I'm thinking this patch is still workable (getting rid of the __ast_repl_* functions).  What if __ast_alloc_region handled MALLOC_FAILURE_MSG and DEBUG_CHAOS?  This would eliminate the inline functions without adding an extra layer of function calls but maintain the functionality improvements you made.  This would also eliminate the need for separate __ast_repl functions and the rest of your comments would no longer apply?

I'll deal with the DEBUG_CHAOS / MALLOC_DEBUG menuselect conflicts when I update this.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If9df4377f74bdbb627461b27a473123e05525887
Gerrit-Change-Number: 8521
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 14 Mar 2018 20:06:45 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180314/f064d6fc/attachment.html>


More information about the asterisk-code-review mailing list