This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] calloc should not duplicate malloc logic.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Will Newton <will dot newton at linaro dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 03 Mar 2014 12:31:55 -0500
- Subject: Re: [PATCH] calloc should not duplicate malloc logic.
- Authentication-results: sourceware.org; auth=none
- References: <20140221150417 dot GA4198 at domone dot podge> <20140226143648 dot GA32752 at spoyarek dot pnq dot redhat dot com> <20140226162521 dot GA24933 at domone dot podge> <20140226165123 dot GA6419 at spoyarek dot pnq dot redhat dot com> <20140226172412 dot GA18515 at domone dot podge> <20140226174050 dot GF6419 at spoyarek dot pnq dot redhat dot com> <20140226185116 dot GB24933 at domone dot podge> <20140226194732 dot GB19987 at domone dot podge> <CANu=DmhF6_J1HzSQiBcvhTac6Ky1gz=WiWD6MqPEP+cCFLGivA at mail dot gmail dot com>
On 03/03/2014 01:02 AM, Will Newton wrote:
>> A faster way would be additionally apply following. There are three
>> parts covered, first one is locking and libc_malloc has almost identical
>> code as this. Second is mmap that I for some reason forgotten. Third
>> part is optimizing memset which should go away as it contains
>> assumptions that will be broken, like that chunk is old multiple of 8.
>>
>> * malloc/malloc.c ( __libc_calloc): Add back mmaped memory
>> handling.
>
> My personal feeling is that the original patch did not meet the
> requirements of consensus and should be reverted on that basis, rather
> than continuing to patch up the results.
Given the objections I've reverted the calloc simplification.
I tested the reverted code works correctly on x86-64.
commit d6285c9f0b3972369356554727b1ede5a6eb0731
Author: Carlos O'Donell <carlos@redhat.com>
Date: Mon Mar 3 12:28:25 2014 -0500
Revert 4248f0da6ff9e7dd63464cdecec2dec332dfc2f0.
Objections were raised surrounding the calloc simplification
and it is better to revert the patch, continue discussions
and then submit a new patch for inclusion with all issues
fully addressed.
Cheers,
Carlos.