This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH v1.1] Expand MALLOC_COPY and MALLOC_ZERO to memcpy/memset.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 10 Dec 2013 00:05:33 -0500
- Subject: Re: [PATCH v1.1] Expand MALLOC_COPY and MALLOC_ZERO to memcpy/memset.
- Authentication-results: sourceware.org; auth=none
- References: <20131209183940 dot GB4601 at domone dot podge> <20131209190210 dot GA4208 at domone dot podge> <20131210023513 dot GC5048 at spoyarek dot pnq dot redhat dot com> <20131210032948 dot GE5048 at spoyarek dot pnq dot redhat dot com>
On 12/09/2013 10:29 PM, Siddhesh Poyarekar wrote:
> On Tue, Dec 10, 2013 at 08:05:13AM +0530, Siddhesh Poyarekar wrote:
>> On Mon, Dec 09, 2013 at 08:02:10PM +0100, OndÅej BÃlka wrote:
>>> On Mon, Dec 09, 2013 at 07:39:40PM +0100, OndÅej BÃlka wrote:
>>>> Continuing cleaning malloc we also expand MALLOC_COPY and MALLOC_ZERO
>>>> to their bodies.
>>> After running check expansion in hook.c is also needed.
>>> * malloc/malloc.c (MALLOC_COPY, MALLOC_ZERO): Delete.
>>> (__malloc_assert, __libc_realloc, __libc_calloc,
>>> _int_realloc): Expand MALLOC_COPY and MALLOC_ZERO to memcpy and
>>> * malloc/hooks.c: Likewise.
>> * malloc/hooks.c (realloc_check): Likewise.
>> Otherwise the change looks OK.
> On second thoughts, I vaguely remember an old thread that talked about
> maintaining compatibility with the old code being the reason why we
> keep everything about the malloc code the way it is, including the
> formatting. I believe that we may have diverged from the original
> code enough that we don't have any incentive to keep this
> compatibility, but I'm going to defer to the senior folks (Roland,
> Andreas', Carlos, Joseph, etc.) to take the final call on this.
> Same goes for the INTERNAL_SIZE_T patch you had posted - something
> about that patch reminded me of the discussion.
I've started a new thread to get people to agree that we should
own this code and make it the best it can be for our users.
I even think we should consider jemalloc... but that's another
discussion e.g. alternate allocators.