summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2015-05-28 22:03:58 (GMT)
committerJason Evans <je@fb.com>2015-05-30 02:21:10 (GMT)
commit56048baeb4ec3ff82a6acd24a4279db2bebbc9ae (patch)
tree1c53636a9ac3a8aa0480f7d57f88e07834361e94 /test
parent09983d2f540fec53a59ac58cba5d86181bf7838a (diff)
downloadjemalloc-56048baeb4ec3ff82a6acd24a4279db2bebbc9ae.zip
jemalloc-56048baeb4ec3ff82a6acd24a4279db2bebbc9ae.tar.gz
jemalloc-56048baeb4ec3ff82a6acd24a4279db2bebbc9ae.tar.bz2
Clarify relationship between stats.resident and stats.mapped.
Diffstat (limited to 'test')
-rw-r--r--test/unit/stats.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/unit/stats.c b/test/unit/stats.c
index 1099967..81ef0b7 100644
--- a/test/unit/stats.c
+++ b/test/unit/stats.c
@@ -3,7 +3,7 @@
TEST_BEGIN(test_stats_summary)
{
size_t *cactive;
- size_t sz, allocated, active, mapped;
+ size_t sz, allocated, active, resident, mapped;
int expected = config_stats ? 0 : ENOENT;
sz = sizeof(cactive);
@@ -15,6 +15,8 @@ TEST_BEGIN(test_stats_summary)
expected, "Unexpected mallctl() result");
assert_d_eq(mallctl("stats.active", &active, &sz, NULL, 0), expected,
"Unexpected mallctl() result");
+ assert_d_eq(mallctl("stats.resident", &resident, &sz, NULL, 0),
+ expected, "Unexpected mallctl() result");
assert_d_eq(mallctl("stats.mapped", &mapped, &sz, NULL, 0), expected,
"Unexpected mallctl() result");
@@ -23,8 +25,10 @@ TEST_BEGIN(test_stats_summary)
"active should be no larger than cactive");
assert_zu_le(allocated, active,
"allocated should be no larger than active");
- assert_zu_le(active, mapped,
- "active should be no larger than mapped");
+ assert_zu_lt(active, resident,
+ "active should be less than resident");
+ assert_zu_lt(active, mapped,
+ "active should be less than mapped");
}
}
TEST_END