diff options
author | Jason Evans <jasone@canonware.com> | 2017-01-04 01:21:59 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-01-07 02:58:46 (GMT) |
commit | edf1bafb2b36ef4e8a2ef1ac19a4f76e5bc42528 (patch) | |
tree | 55512f1f1a6599756dac8d014f1826afd3cb3795 /test/unit/mallctl.c | |
parent | 3f291d59ada15f2be84c80dac71e0ddf03908d15 (diff) | |
download | jemalloc-edf1bafb2b36ef4e8a2ef1ac19a4f76e5bc42528.zip jemalloc-edf1bafb2b36ef4e8a2ef1ac19a4f76e5bc42528.tar.gz jemalloc-edf1bafb2b36ef4e8a2ef1ac19a4f76e5bc42528.tar.bz2 |
Implement arena.<i>.destroy .
Add MALLCTL_ARENAS_DESTROYED for accessing destroyed arena stats as an
analogue to MALLCTL_ARENAS_ALL.
This resolves #382.
Diffstat (limited to 'test/unit/mallctl.c')
-rw-r--r-- | test/unit/mallctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/mallctl.c b/test/unit/mallctl.c index b332078..fbe76cb 100644 --- a/test/unit/mallctl.c +++ b/test/unit/mallctl.c @@ -381,6 +381,15 @@ TEST_BEGIN(test_arena_i_initialized) "Unexpected mallctl() failure"); assert_true(initialized, "Merged arena statistics should always be initialized"); + + /* Equivalent to the above but using mallctl() directly. */ + sz = sizeof(initialized); + assert_d_eq(mallctl( + "arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".initialized", + (void *)&initialized, &sz, NULL, 0), 0, + "Unexpected mallctl() failure"); + assert_true(initialized, + "Merged arena statistics should always be initialized"); } TEST_END |