summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2016-02-07 22:23:22 (GMT)
committerJason Evans <jasone@canonware.com>2016-02-20 04:29:06 (GMT)
commitf829009929bdce17bef8a963264a92e39271a166 (patch)
treef1ed15fbe6a045a3af06909c7089af64c735cfac /test
parentef349f3f944b9b40bdeeff6cc322ef753f1ad4be (diff)
downloadjemalloc-f829009929bdce17bef8a963264a92e39271a166.zip
jemalloc-f829009929bdce17bef8a963264a92e39271a166.tar.gz
jemalloc-f829009929bdce17bef8a963264a92e39271a166.tar.bz2
Add --with-malloc-conf.
Add --with-malloc-conf, which makes it possible to embed a default options string during configuration.
Diffstat (limited to 'test')
-rw-r--r--test/unit/mallctl.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/test/unit/mallctl.c b/test/unit/mallctl.c
index 31e354c..fde223f 100644
--- a/test/unit/mallctl.c
+++ b/test/unit/mallctl.c
@@ -117,8 +117,8 @@ TEST_END
TEST_BEGIN(test_mallctl_config)
{
-#define TEST_MALLCTL_CONFIG(config) do { \
- bool oldval; \
+#define TEST_MALLCTL_CONFIG(config, t) do { \
+ t oldval; \
size_t sz = sizeof(oldval); \
assert_d_eq(mallctl("config."#config, &oldval, &sz, NULL, 0), \
0, "Unexpected mallctl() failure"); \
@@ -126,20 +126,21 @@ TEST_BEGIN(test_mallctl_config)
assert_zu_eq(sz, sizeof(oldval), "Unexpected output size"); \
} while (0)
- TEST_MALLCTL_CONFIG(cache_oblivious);
- TEST_MALLCTL_CONFIG(debug);
- TEST_MALLCTL_CONFIG(fill);
- TEST_MALLCTL_CONFIG(lazy_lock);
- TEST_MALLCTL_CONFIG(munmap);
- TEST_MALLCTL_CONFIG(prof);
- TEST_MALLCTL_CONFIG(prof_libgcc);
- TEST_MALLCTL_CONFIG(prof_libunwind);
- TEST_MALLCTL_CONFIG(stats);
- TEST_MALLCTL_CONFIG(tcache);
- TEST_MALLCTL_CONFIG(tls);
- TEST_MALLCTL_CONFIG(utrace);
- TEST_MALLCTL_CONFIG(valgrind);
- TEST_MALLCTL_CONFIG(xmalloc);
+ TEST_MALLCTL_CONFIG(cache_oblivious, bool);
+ TEST_MALLCTL_CONFIG(debug, bool);
+ TEST_MALLCTL_CONFIG(fill, bool);
+ TEST_MALLCTL_CONFIG(lazy_lock, bool);
+ TEST_MALLCTL_CONFIG(malloc_conf, const char *);
+ TEST_MALLCTL_CONFIG(munmap, bool);
+ TEST_MALLCTL_CONFIG(prof, bool);
+ TEST_MALLCTL_CONFIG(prof_libgcc, bool);
+ TEST_MALLCTL_CONFIG(prof_libunwind, bool);
+ TEST_MALLCTL_CONFIG(stats, bool);
+ TEST_MALLCTL_CONFIG(tcache, bool);
+ TEST_MALLCTL_CONFIG(tls, bool);
+ TEST_MALLCTL_CONFIG(utrace, bool);
+ TEST_MALLCTL_CONFIG(valgrind, bool);
+ TEST_MALLCTL_CONFIG(xmalloc, bool);
#undef TEST_MALLCTL_CONFIG
}