[PATCH v3 1/5] malloc: Split _int_free() into 3 sub functions
Guo, Wangyang
wangyang.guo@intel.com
Mon Oct 14 02:03:50 GMT 2024
On 10/2/2024 9:22 AM, Guo, Wangyang wrote:
> On 9/30/2024 8:27 PM, Florian Weimer wrote:
>> * Wangyang Guo:
>>
>>> Split _int_free() into 3 smaller functions for flexible combination:
>>> * _int_free_check -- sanity check for free
>>> * tcache_free -- free memory to tcache (quick path)
>>> * _int_free_chunk -- free memory chunk (slow path)
>>>
>>> ---
>>> Changes in v3:
>>> - Add comments to the split functions.
>>> - Wrap out seldom executed tcache_double_free_verify() as noinline
>>> function.
>>> - Link to v2:
>>> https://sourceware.org/pipermail/libc-alpha/2024-August/159426.html
>>> No changes in v2
>>> ---
>>> malloc/malloc.c | 133 ++++++++++++++++++++++++++++++------------------
>>> 1 file changed, 84 insertions(+), 49 deletions(-)
>>
>> Overall this looks good. Do you have commit access?
>
> I don't have commit access. It would be great if you can help to commit.
>>
>>> +/* Free chunk P of SIZE bytes to the arena, if arena lock is held,
>>> + set have_lock to 1. Caller must ensure chunk and size are valid. */
>>
>> Suggest: “HAVE_LOCK indicates where the arena for P has already been
>> locked.”
>> (There's another instance further down below.)
>>
>> Is it okay if I make these adjustments for you?
>
> That's OK for me.
Hi Florian,
Is there anything else I can help for this patch series?
BR
Wangyang
More information about the Libc-alpha
mailing list