This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Unify malloc locking.
- From: Will Newton <will dot newton at linaro dot org>
- To: Ondřej Bílka <neleai at seznam dot cz>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 17 Mar 2014 12:06:07 +0000
- Subject: Re: [PATCH] Unify malloc locking.
- Authentication-results: sourceware.org; auth=none
- References: <20140303155858 dot GA28648 at domone>
On 3 March 2014 15:58, OndÅej BÃlka <neleai@seznam.cz> wrote:
> Hi, as another refactoring this moves logic of all allocation to
> pass through one place, function _mid_malloc. There a things like what
> arena to use, retrying with different one are placed. An arena used
> could be obtained as an argument.
>
> I merged arena_lock and arena_lookup macros there as they were used only
> at that place and writing these explicitly will make modifications
> easier.
>
> There is still a custom locking needed for realloc which would be
> additional case that we need to consider.
>
> I did a minimal change to make hooks work, I plan to add a checksum
> based checks which would be stronger than we have now.
>
> Comments?
This patch on its own is quite hard to review - it refactors the code
but it is not clear why the new shape of the code is better than the
old shape of the code, and with a fair number of lines changed in a
quite complex bit of code it is quite a bit of effort to review.
It might be better for review purposes to put your malloc improvement
patches on a development branch so people can see where the
refactoring steps are leading rather than having to review refactor
patches singly.
--
Will Newton
Toolchain Working Group, Linaro