Fix next_arena initialization.
If there is more than one arena, initialize next_arena so that the first and second threads to allocate memory use arenas 0 and 1, rather than both using arena 0.
This commit is contained in:
parent
2206e1acc1
commit
ed3d152ea0
@ -775,7 +775,7 @@ MALLOC_OUT:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_TLS
|
#ifndef NO_TLS
|
||||||
next_arena = 0;
|
next_arena = (narenas > 0) ? 1 : 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Allocate and initialize arenas. */
|
/* Allocate and initialize arenas. */
|
||||||
|
Loading…
Reference in New Issue
Block a user