summaryrefslogtreecommitdiff
path: root/deps/jemalloc/test/unit/prof_idump.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/test/unit/prof_idump.c')
-rw-r--r--deps/jemalloc/test/unit/prof_idump.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/deps/jemalloc/test/unit/prof_idump.c b/deps/jemalloc/test/unit/prof_idump.c
index bdea53ecd..1cc6c98cd 100644
--- a/deps/jemalloc/test/unit/prof_idump.c
+++ b/deps/jemalloc/test/unit/prof_idump.c
@@ -1,16 +1,9 @@
#include "test/jemalloc_test.h"
-#ifdef JEMALLOC_PROF
-const char *malloc_conf =
- "prof:true,prof_accum:true,prof_active:false,lg_prof_sample:0,"
- "lg_prof_interval:0";
-#endif
-
static bool did_prof_dump_open;
static int
-prof_dump_open_intercept(bool propagate_err, const char *filename)
-{
+prof_dump_open_intercept(bool propagate_err, const char *filename) {
int fd;
did_prof_dump_open = true;
@@ -18,19 +11,19 @@ prof_dump_open_intercept(bool propagate_err, const char *filename)
fd = open("/dev/null", O_WRONLY);
assert_d_ne(fd, -1, "Unexpected open() failure");
- return (fd);
+ return fd;
}
-TEST_BEGIN(test_idump)
-{
+TEST_BEGIN(test_idump) {
bool active;
void *p;
test_skip_if(!config_prof);
active = true;
- assert_d_eq(mallctl("prof.active", NULL, NULL, &active, sizeof(active)),
- 0, "Unexpected mallctl failure while activating profiling");
+ assert_d_eq(mallctl("prof.active", NULL, NULL, (void *)&active,
+ sizeof(active)), 0,
+ "Unexpected mallctl failure while activating profiling");
prof_dump_open = prof_dump_open_intercept;
@@ -43,9 +36,7 @@ TEST_BEGIN(test_idump)
TEST_END
int
-main(void)
-{
-
- return (test(
- test_idump));
+main(void) {
+ return test(
+ test_idump);
}