[PATCH][malloc] Improve malloc initialization sequence

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Oct 12 13:52:00 GMT 2017


Florian Weimer wrote:

> The patch was truncated before being attached, it ends with:

@@ -5137,11 +5114,13 @@ __libc_mallopt (int param_number, int value)
    if (__malloc_initialized < 0)
      ptmalloc_init ();
    __libc_lock_lock (av->mutex);
-  /* Ensure initialization/consolidation */
-  malloc_consolidate (av);
=20
    LIBC_PROBE (memory_mallopt, 2, param_number, value);
=20
+  /* We must consolidate main arena before changing max_fast
+     (see definition of set_max_fast).  */
+  malloc_consolidate (av);
+
    switch (param_number)
      {
      case M_MXFAST:=

> This is not a valid diff hunk (after quoted-printable decoding).

It works fine for me, when used on current GLIBC I get one merge conflict as
it needs https://sourceware.org/ml/libc-alpha/2017-09/msg00829.html to be
applied too.

Wilco 


More information about the Libc-alpha mailing list