Fix arena_bind().
When tsd is not in nominal state (e.g. during thread termination), we should not increment nthreads.
This commit is contained in:
parent
9ebbfca93f
commit
57ed894f8a
@ -455,16 +455,17 @@ arena_bind(tsd_t *tsd, unsigned ind, bool internal)
|
|||||||
{
|
{
|
||||||
arena_t *arena;
|
arena_t *arena;
|
||||||
|
|
||||||
|
if (!tsd_nominal(tsd))
|
||||||
|
return;
|
||||||
|
|
||||||
arena = arena_get(tsd_tsdn(tsd), ind, false);
|
arena = arena_get(tsd_tsdn(tsd), ind, false);
|
||||||
arena_nthreads_inc(arena, internal);
|
arena_nthreads_inc(arena, internal);
|
||||||
|
|
||||||
if (tsd_nominal(tsd)) {
|
|
||||||
if (internal)
|
if (internal)
|
||||||
tsd_iarena_set(tsd, arena);
|
tsd_iarena_set(tsd, arena);
|
||||||
else
|
else
|
||||||
tsd_arena_set(tsd, arena);
|
tsd_arena_set(tsd, arena);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind)
|
arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind)
|
||||||
|
Loading…
Reference in New Issue
Block a user