This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: Remove malloc hooks from fork handler
- From: Torvald Riegel <triegel at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 12 Apr 2016 20:19:09 +0200
- Subject: Re: [PATCH] malloc: Remove malloc hooks from fork handler
- Authentication-results: sourceware.org; auth=none
- References: <56BBB02E dot 5020906 at redhat dot com> <56E177E7 dot 6030304 at redhat dot com>
On Thu, 2016-03-10 at 14:34 +0100, Florian Weimer wrote:
> On 02/10/2016 10:48 PM, Florian Weimer wrote:
> > 2016-02-10 Florian Weimer <fweimer@redhat.com>
> >
> > Remove malloc hooks from fork handler. They are no longer needed
> > because malloc runs right before fork, and no malloc calls from
> > other fork handlers are possible anymore.
> > * malloc/malloc.c (malloc_atfork, free_atfork): Remove
> > declarations.
> > * malloc/arena.c (save_malloc_hook, save_free_hook, save_arena)
> > (ATFORK_ARENA_PTR, malloc_atfork, free_atfork)
> > (atfork_recursive_cntr): Remove.
> > (__malloc_fork_lock_parent): Do not override malloc hooks and
> > thread_arena.
> > (__malloc_fork_unlock_parent): Do not restore malloc hooks and
> > thread_arena.
> > (__malloc_fork_unlock_child): Do not restore malloc hooks. Use
> > thread_arena i
>
> Ping?
You answered the only question that I had, and it looked good to me
otherwise.