[Asterisk-code-review] taskprocessor: Do not use separate allocation for stats or n... (asterisk[13])
Corey Farrell
asteriskteam at digium.com
Mon Nov 12 07:15:37 CST 2018
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/10621 )
Change subject: taskprocessor: Do not use separate allocation for stats or name.
......................................................................
Patch Set 2:
(2 comments)
https://gerrit.asterisk.org/#/c/10621/1/main/taskprocessor.c
File main/taskprocessor.c:
https://gerrit.asterisk.org/#/c/10621/1/main/taskprocessor.c@520
PS1, Line 520: maxqsize = tps->stats.max_qsize;
> Was it ever possible in the first place to not have tps->stats?
No. __allocate_taskprocessor unconditionally allocated tps->stats and failed the whole thing if that calloc failed. See the check at line 761 of the original source.
https://gerrit.asterisk.org/#/c/10621/1/main/taskprocessor.c@752
PS1, Line 752: ao2_ref(listener, +1);
> As you're in the area why not roll this into the ao2_alloc and eliminate this memory allocation?
That seems reasonable for 13/16 but I have plans for master to use a weakproxy in tps_singletons, that weakproxy will own the storage for name.
--
To view, visit https://gerrit.asterisk.org/10621
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I74fe9a7f357f0e6d63152f163cf5eef6428218e1
Gerrit-Change-Number: 10621
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Mon, 12 Nov 2018 13:15:37 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181112/50fce710/attachment.html>
More information about the asterisk-code-review
mailing list