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: OndÅej BÃlka <neleai at seznam dot cz>
- To: Carlos O'Donell <carlos at redhat dot com>
- 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: Wed, 5 Mar 2014 18:19:41 +0100
- 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> <5314BC8B dot 6050804 at redhat dot com>
On Mon, Mar 03, 2014 at 12:31:55PM -0500, Carlos O'Donell wrote:
> 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.
>
OK, I will send a patch so you could review mostly same change again.