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] malloc: Perform full initialization before __malloc_check_init


fweimer@redhat.com (Florian Weimer) writes:
> +      /* Perform full initialization.  */
> +      malloc_consolidate (&main_arena);

I'd like this comment to have more of a "why" component, so that future
readers understand why we're "consolidating" in an initialization
function, but otherwise the patch looks good to me.  Perhaps this?

> /* Call this once to initialize the arenas as a side-effect. */

Alternatively, call the two functions that malloc_consolidate() calls:

    malloc_init_state(av);
    check_malloc_state(av);

(is the second really needed though?)


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