diff options
author | Jason Evans <je@fb.com> | 2010-12-29 20:21:05 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2010-12-29 20:21:05 (GMT) |
commit | 624f2f3cc9e6aa2a5eab18bd1eb84f89a6ac8b5c (patch) | |
tree | 5414226bed255b5c4d571d65c4ca7757ed27a5e6 /jemalloc/src | |
parent | 8ad0eacfb351af990ae021f219b7b88d70aede41 (diff) | |
download | jemalloc-624f2f3cc9e6aa2a5eab18bd1eb84f89a6ac8b5c.zip jemalloc-624f2f3cc9e6aa2a5eab18bd1eb84f89a6ac8b5c.tar.gz jemalloc-624f2f3cc9e6aa2a5eab18bd1eb84f89a6ac8b5c.tar.bz2 |
Fix a "thread.arena" mallctl bug.
When setting a new arena association for the calling thread, also update
the tcache's cached arena pointer, primarily so that
tcache_alloc_small_hard() uses the intended arena.
Diffstat (limited to 'jemalloc/src')
-rw-r--r-- | jemalloc/src/ctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jemalloc/src/ctl.c b/jemalloc/src/ctl.c index 3c8adab..0b8b06f 100644 --- a/jemalloc/src/ctl.c +++ b/jemalloc/src/ctl.c @@ -1137,6 +1137,11 @@ thread_arena_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, /* Set new arena association. */ ARENA_SET(arena); + { + tcache_t *tcache = TCACHE_GET(); + if (tcache != NULL) + tcache->arena = arena; + } } ret = 0; |