This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v1.1] Expand MALLOC_COPY and MALLOC_ZERO to memcpy/memset.


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:
>>>> Hi,
>>>>
>>>> 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
>>> 	memset.
>>> 	* 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.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]