aboutsummaryrefslogtreecommitdiffstats
path: root/src/prof.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-12-22 16:39:10 -0600
committerJason Evans <jasone@canonware.com>2016-12-26 18:08:28 -0800
commita0dd3a4483e2e72ee80e70424a6522f873f2c7ff (patch)
tree35653ce115166355fd3989dff22714dc0402bf15 /src/prof.c
parenta6e86810d83aba0d94d0f6423ed09e8e6e0909fa (diff)
downloadplatform_external_jemalloc_new-a0dd3a4483e2e72ee80e70424a6522f873f2c7ff.tar.gz
platform_external_jemalloc_new-a0dd3a4483e2e72ee80e70424a6522f873f2c7ff.tar.bz2
platform_external_jemalloc_new-a0dd3a4483e2e72ee80e70424a6522f873f2c7ff.zip
Implement per arena base allocators.
Add/rename related mallctls: - Add stats.arenas.<i>.base . - Rename stats.arenas.<i>.metadata to stats.arenas.<i>.internal . - Add stats.arenas.<i>.resident . Modify the arenas.extend mallctl to take an optional (extent_hooks_t *) argument so that it is possible for all base allocations to be serviced by the specified extent hooks. This resolves #463.
Diffstat (limited to 'src/prof.c')
-rw-r--r--src/prof.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/prof.c b/src/prof.c
index 19c8fb71..b9a9d659 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -2254,7 +2254,8 @@ prof_boot2(tsd_t *tsd)
}
gctx_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd),
- PROF_NCTX_LOCKS * sizeof(malloc_mutex_t));
+ b0get(), PROF_NCTX_LOCKS * sizeof(malloc_mutex_t),
+ CACHELINE);
if (gctx_locks == NULL)
return (true);
for (i = 0; i < PROF_NCTX_LOCKS; i++) {
@@ -2264,7 +2265,8 @@ prof_boot2(tsd_t *tsd)
}
tdata_locks = (malloc_mutex_t *)base_alloc(tsd_tsdn(tsd),
- PROF_NTDATA_LOCKS * sizeof(malloc_mutex_t));
+ b0get(), PROF_NTDATA_LOCKS * sizeof(malloc_mutex_t),
+ CACHELINE);
if (tdata_locks == NULL)
return (true);
for (i = 0; i < PROF_NTDATA_LOCKS; i++) {