diff options
| author | Jason Evans <jasone@canonware.com> | 2013-01-23 18:32:04 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2013-01-23 18:32:04 (GMT) |
| commit | 83789f45307379e096c4e8be81d9e9a51e3f5a4a (patch) | |
| tree | f8e39c4489cd99df1ed53475e79a4e5fe76483c2 /src/tcache.c | |
| parent | 87499f6748ebe4817571e817e9f680ccb5bf54a9 (diff) | |
| parent | b5681fb20c17478f2193fead19b7788807e39996 (diff) | |
| download | jemalloc-3.3.0.zip jemalloc-3.3.0.tar.gz jemalloc-3.3.0.tar.bz2 | |
Merge branch 'dev'3.3.0
Diffstat (limited to 'src/tcache.c')
| -rw-r--r-- | src/tcache.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/tcache.c b/src/tcache.c index 47e14f3..7befdc8 100644 --- a/src/tcache.c +++ b/src/tcache.c @@ -97,9 +97,7 @@ tcache_bin_flush_small(tcache_bin_t *tbin, size_t binind, unsigned rem, arena_bin_t *bin = &arena->bins[binind]; if (config_prof && arena == tcache->arena) { - malloc_mutex_lock(&arena->lock); arena_prof_accum(arena, tcache->prof_accumbytes); - malloc_mutex_unlock(&arena->lock); tcache->prof_accumbytes = 0; } @@ -180,7 +178,7 @@ tcache_bin_flush_large(tcache_bin_t *tbin, size_t binind, unsigned rem, malloc_mutex_lock(&arena->lock); if ((config_prof || config_stats) && arena == tcache->arena) { if (config_prof) { - arena_prof_accum(arena, + arena_prof_accum_locked(arena, tcache->prof_accumbytes); tcache->prof_accumbytes = 0; } @@ -343,11 +341,8 @@ tcache_destroy(tcache_t *tcache) } } - if (config_prof && tcache->prof_accumbytes > 0) { - malloc_mutex_lock(&tcache->arena->lock); + if (config_prof && tcache->prof_accumbytes > 0) arena_prof_accum(tcache->arena, tcache->prof_accumbytes); - malloc_mutex_unlock(&tcache->arena->lock); - } tcache_size = arena_salloc(tcache, false); if (tcache_size <= SMALL_MAXCLASS) { |
