diff options
author | Jason Evans <je@facebook.com> | 2010-05-11 19:00:22 (GMT) |
---|---|---|
committer | Jason Evans <je@facebook.com> | 2010-05-11 19:00:22 (GMT) |
commit | ed3d152ea0aa39169a9629962a40c58e67b0b532 (patch) | |
tree | 2c1851dc6ca99a071f302318878845e13d8194dd | |
parent | 2206e1acc12a078b0108052e3c1aca745887188e (diff) | |
download | jemalloc-ed3d152ea0aa39169a9629962a40c58e67b0b532.zip jemalloc-ed3d152ea0aa39169a9629962a40c58e67b0b532.tar.gz jemalloc-ed3d152ea0aa39169a9629962a40c58e67b0b532.tar.bz2 |
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.
-rw-r--r-- | jemalloc/src/jemalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jemalloc/src/jemalloc.c b/jemalloc/src/jemalloc.c index aeab140..bf2ace3 100644 --- a/jemalloc/src/jemalloc.c +++ b/jemalloc/src/jemalloc.c @@ -775,7 +775,7 @@ MALLOC_OUT: #endif #ifndef NO_TLS - next_arena = 0; + next_arena = (narenas > 0) ? 1 : 0; #endif /* Allocate and initialize arenas. */ |