summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-02-11 20:24:27 (GMT)
committerJason Evans <jasone@canonware.com>2015-02-12 08:15:56 (GMT)
commitcbf3a6d70371d2390b8b0e76814e04cc6088002c (patch)
tree2b2cfd2ec225e680a83a5d231bc11e44892e66b9 /test
parentf30e261c5b85d2900224f91c6d426a23dce94fe9 (diff)
downloadjemalloc-cbf3a6d70371d2390b8b0e76814e04cc6088002c.zip
jemalloc-cbf3a6d70371d2390b8b0e76814e04cc6088002c.tar.gz
jemalloc-cbf3a6d70371d2390b8b0e76814e04cc6088002c.tar.bz2
Move centralized chunk management into arenas.
Migrate all centralized data structures related to huge allocations and recyclable chunks into arena_t, so that each arena can manage huge allocations and recyclable virtual memory completely independently of other arenas. Add chunk node caching to arenas, in order to avoid contention on the base allocator. Use chunks_rtree to look up huge allocations rather than a red-black tree. Maintain a per arena unsorted list of huge allocations (which will be needed to enumerate huge allocations during arena reset). Remove the --enable-ivsalloc option, make ivsalloc() always available, and use it for size queries if --enable-debug is enabled. The only practical implications to this removal are that 1) ivsalloc() is now always available during live debugging (and the underlying radix tree is available during core-based debugging), and 2) size query validation can no longer be enabled independent of --enable-debug. Remove the stats.chunks.{current,total,high} mallctls, and replace their underlying statistics with simpler atomically updated counters used exclusively for gdump triggering. These statistics are no longer very useful because each arena manages chunks independently, and per arena statistics provide similar information. Simplify chunk synchronization code, now that base chunk allocation cannot cause recursive lock acquisition.
Diffstat (limited to 'test')
-rw-r--r--test/unit/stats.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/test/unit/stats.c b/test/unit/stats.c
index 946e737..1099967 100644
--- a/test/unit/stats.c
+++ b/test/unit/stats.c
@@ -29,32 +29,6 @@ TEST_BEGIN(test_stats_summary)
}
TEST_END
-TEST_BEGIN(test_stats_chunks)
-{
- size_t current, high;
- uint64_t total;
- size_t sz;
- int expected = config_stats ? 0 : ENOENT;
-
- sz = sizeof(size_t);
- assert_d_eq(mallctl("stats.chunks.current", &current, &sz, NULL, 0),
- expected, "Unexpected mallctl() result");
- sz = sizeof(uint64_t);
- assert_d_eq(mallctl("stats.chunks.total", &total, &sz, NULL, 0),
- expected, "Unexpected mallctl() result");
- sz = sizeof(size_t);
- assert_d_eq(mallctl("stats.chunks.high", &high, &sz, NULL, 0), expected,
- "Unexpected mallctl() result");
-
- if (config_stats) {
- assert_zu_le(current, high,
- "current should be no larger than high");
- assert_u64_le((uint64_t)high, total,
- "high should be no larger than total");
- }
-}
-TEST_END
-
TEST_BEGIN(test_stats_huge)
{
void *p;
@@ -458,7 +432,6 @@ main(void)
return (test(
test_stats_summary,
- test_stats_chunks,
test_stats_huge,
test_stats_arenas_summary,
test_stats_arenas_small,