/external/jemalloc_new/test/unit/ |
D | mallctl.c | 9 assert_d_eq(mallctl("no_such_name", NULL, NULL, NULL, 0), ENOENT, in TEST_BEGIN() 12 assert_d_eq(mallctl("version", NULL, NULL, "0.0.0", strlen("0.0.0")), in TEST_BEGIN() 16 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, in TEST_BEGIN() 19 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, in TEST_BEGIN() 24 assert_d_eq(mallctl("epoch", (void *)&epoch, &sz, NULL, 0), EINVAL, in TEST_BEGIN() 27 assert_d_eq(mallctl("epoch", (void *)&epoch, &sz, NULL, 0), EINVAL, in TEST_BEGIN() 37 assert_d_eq(mallctlnametomib("no_such_name", mib, &miblen), ENOENT, in TEST_BEGIN() 49 assert_d_eq(mallctlnametomib("version", mib, &miblen), 0, in TEST_BEGIN() 52 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, "0.0.0", in TEST_BEGIN() 57 assert_d_eq(mallctlnametomib("epoch", mib, &miblen), 0, in TEST_BEGIN() [all …]
|
D | stats.c | 8 assert_d_eq(mallctl("stats.allocated", (void *)&allocated, &sz, NULL, in TEST_BEGIN() 10 assert_d_eq(mallctl("stats.active", (void *)&active, &sz, NULL, 0), in TEST_BEGIN() 12 assert_d_eq(mallctl("stats.resident", (void *)&resident, &sz, NULL, 0), in TEST_BEGIN() 14 assert_d_eq(mallctl("stats.mapped", (void *)&mapped, &sz, NULL, 0), in TEST_BEGIN() 39 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, sizeof(epoch)), in TEST_BEGIN() 43 assert_d_eq(mallctl("stats.arenas.0.large.allocated", in TEST_BEGIN() 47 assert_d_eq(mallctl("stats.arenas.0.large.nmalloc", (void *)&nmalloc, in TEST_BEGIN() 49 assert_d_eq(mallctl("stats.arenas.0.large.ndalloc", (void *)&ndalloc, in TEST_BEGIN() 51 assert_d_eq(mallctl("stats.arenas.0.large.nrequests", in TEST_BEGIN() 85 assert_d_eq(mallctl("thread.tcache.flush", NULL, NULL, NULL, 0), in TEST_BEGIN() [all …]
|
D | nstime.c | 40 assert_d_eq(nstime_compare(&nsta, &nstb), 0, "Times should be equal"); in TEST_BEGIN() 41 assert_d_eq(nstime_compare(&nstb, &nsta), 0, "Times should be equal"); in TEST_BEGIN() 44 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN() 46 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN() 50 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN() 52 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN() 56 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN() 58 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN() 62 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN() 64 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN() [all …]
|
D | background_thread_enable.c | 19 assert_d_eq(mallctl("arenas.create", &id, &sz_u, NULL, 0), 0, in TEST_BEGIN() 25 assert_d_eq(mallctl("background_thread", NULL, NULL, &enable, sz_b), 0, in TEST_BEGIN() 28 assert_d_eq(mallctl("background_thread", NULL, NULL, &enable, sz_b), 0, in TEST_BEGIN() 39 assert_d_eq(mallctl("opt.max_background_threads", in TEST_BEGIN() 42 assert_d_eq(mallctl("max_background_threads", &maxt, &sz_m, NULL, 0), 0, in TEST_BEGIN() 48 assert_d_eq(mallctl("max_background_threads", NULL, NULL, &maxt, sz_m), in TEST_BEGIN() 55 assert_d_eq(mallctl("arenas.create", &id, &sz_u, NULL, 0), 0, in TEST_BEGIN() 61 assert_d_eq(mallctl("background_thread", NULL, NULL, &enable, sz_b), 0, in TEST_BEGIN() 66 assert_d_eq(mallctl("max_background_threads", NULL, NULL, &maxt, sz_m), in TEST_BEGIN() 71 assert_d_eq(mallctl("max_background_threads", NULL, NULL, &maxt, sz_m), in TEST_BEGIN()
|
D | decay.c | 20 assert_d_eq(ret, 0, "Unexpected mallctl error"); in check_background_thread_enabled() 42 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, NULL, 0), in do_arena_create() 47 assert_d_eq(mallctlnametomib("arena.0.dirty_decay_ms", mib, &miblen), in do_arena_create() 50 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, in do_arena_create() 54 assert_d_eq(mallctlnametomib("arena.0.muzzy_decay_ms", mib, &miblen), in do_arena_create() 57 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, in do_arena_create() 68 assert_d_eq(mallctlnametomib("arena.0.destroy", mib, &miblen), 0, in do_arena_destroy() 71 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in do_arena_destroy() 78 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, sizeof(epoch)), in do_epoch() 86 assert_d_eq(mallctlnametomib("arena.0.purge", mib, &miblen), 0, in do_purge() [all …]
|
D | pack.c | 25 assert_d_eq(mallctl("arenas.nbins", (void *)&nbins, &sz, NULL, 0), 0, in binind_compute() 33 assert_d_eq(mallctlnametomib("arenas.bin.0.size", mib, in binind_compute() 38 assert_d_eq(mallctlbymib(mib, miblen, (void *)&size, &sz, NULL, in binind_compute() 57 assert_d_eq(mallctlnametomib("arenas.bin.0.nregs", mib, &miblen), 0, in nregs_per_run_compute() 61 assert_d_eq(mallctlbymib(mib, miblen, (void *)&nregs, &sz, NULL, in nregs_per_run_compute() 72 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, NULL, 0), in arenas_create_mallctl() 83 assert_d_eq(mallctlnametomib("arena.0.reset", mib, &miblen), 0, in arena_reset_mallctl() 86 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in arena_reset_mallctl()
|
D | prof_reset.c | 15 assert_d_eq(mallctl("prof.active", NULL, NULL, (void *)&active, in set_prof_active() 24 assert_d_eq(mallctl("prof.lg_sample", (void *)&lg_prof_sample, &sz, in get_lg_prof_sample() 32 assert_d_eq(mallctl("prof.reset", NULL, NULL, in do_prof_reset() 47 assert_d_eq(mallctl("opt.lg_prof_sample", (void *)&lg_prof_sample_orig, in TEST_BEGIN() 59 assert_d_eq(mallctl("prof.reset", NULL, NULL, NULL, 0), 0, in TEST_BEGIN() 112 assert_d_eq(mallctl("prof.dump", NULL, NULL, NULL, 0), in TEST_BEGIN() 117 assert_d_eq(mallctl("prof.reset", NULL, NULL, NULL, 0), 0, in TEST_BEGIN() 119 assert_d_eq(mallctl("prof.dump", NULL, NULL, NULL, 0), in TEST_BEGIN() 148 assert_d_eq(mallctl("prof.reset", NULL, NULL, NULL, 0), in thd_start() 154 assert_d_eq(mallctl("prof.dump", NULL, NULL, NULL, 0), in thd_start()
|
D | extent_quantize.c | 15 assert_d_eq(mallctl("arenas.nbins", (void *)&nbins, &sz, NULL, 0), 0, in TEST_BEGIN() 18 assert_d_eq(mallctlnametomib("arenas.bin.0.slab_size", mib, &miblen), 0, in TEST_BEGIN() 23 assert_d_eq(mallctlbymib(mib, miblen, (void *)&extent_size, &sz, in TEST_BEGIN() 50 assert_d_eq(mallctl("config.cache_oblivious", (void *)&cache_oblivious, in TEST_BEGIN() 54 assert_d_eq(mallctl("arenas.nlextents", (void *)&nlextents, &sz, NULL, in TEST_BEGIN() 57 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in TEST_BEGIN() 64 assert_d_eq(mallctlbymib(mib, miblen, (void *)&lextent_size, in TEST_BEGIN()
|
D | prof_thread_name.c | 10 assert_d_eq(mallctl("thread.prof.name", (void *)&thread_name_old, &sz, in mallctl_thread_name_get_impl() 23 assert_d_eq(mallctl("thread.prof.name", NULL, NULL, in mallctl_thread_name_set_impl() 42 assert_d_eq(mallctl("thread.prof.name", NULL, NULL, in TEST_BEGIN() 49 assert_d_eq(mallctl("thread.prof.name", NULL, NULL, in TEST_BEGIN() 60 assert_d_eq(mallctl("thread.prof.name", in TEST_BEGIN() 85 assert_d_eq(mallctl("prof.reset", NULL, NULL, NULL, 0), 0, in thd_start()
|
D | log.c | 28 assert_d_eq(count, 0, "Disabled logging not ignored!"); in expect_no_logging() 59 assert_d_eq(count, 10, "Mis-logged!"); in TEST_BEGIN() 68 assert_d_eq(count, 10, "Mis-logged!"); in TEST_BEGIN() 81 assert_d_eq(count, 20, "Mis-logged!"); in TEST_BEGIN() 131 assert_d_eq(count, 40, "Mis-logged!"); in TEST_BEGIN() 153 assert_d_eq(count, 20, "Mis-logged!"); in TEST_BEGIN() 169 assert_d_eq(count, 0, "Logging shouldn't happen if not initialized."); in TEST_BEGIN()
|
D | arena_reset.c | 16 assert_d_eq(mallctl(cmd, (void *)&ret, &z, NULL, 0), 0, in get_nsizes_impl() 40 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in get_size_impl() 44 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0), in get_size_impl() 91 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, in do_arena_create() 166 assert_d_eq(mallctlnametomib(name, mib, &miblen), 0, in do_arena_reset_destroy() 169 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in do_arena_reset_destroy() 203 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, in arena_i_initialized() 208 assert_d_eq(mallctlnametomib("arena.0.initialized", mib, &miblen), 0, in arena_i_initialized() 212 assert_d_eq(mallctlbymib(mib, miblen, (void *)&initialized, &sz, NULL, in arena_i_initialized()
|
D | retained.c | 17 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, in do_arena_create() 29 assert_d_eq(mallctlnametomib("arena.0.destroy", mib, &miblen), 0, in do_arena_destroy() 32 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in do_arena_destroy() 39 assert_d_eq(mallctl("epoch", NULL, NULL, (void *)&epoch, in do_refresh() 49 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in do_get_size_impl() 53 assert_d_eq(mallctlbymib(mib, miblen, (void *)&size, &z, NULL, 0), in do_get_size_impl()
|
D | background_thread.c | 11 assert_d_eq(mallctl("background_thread", (void *)&e0, &sz, in test_switch_background_thread_ctl() 30 assert_d_eq(mallctl("background_thread", (void *)&e0, &sz, in test_repeat_background_thread_ctl() 49 assert_d_eq(mallctl("opt.background_thread", (void *)&e0, &sz, in TEST_BEGIN() 51 assert_d_eq(mallctl("background_thread", (void *)&e1, &sz, in TEST_BEGIN()
|
D | prof_gdump.c | 25 assert_d_eq(mallctl("prof.active", NULL, NULL, (void *)&active, in TEST_BEGIN() 43 assert_d_eq(mallctl("prof.gdump", (void *)&gdump_old, &sz, in TEST_BEGIN() 54 assert_d_eq(mallctl("prof.gdump", (void *)&gdump_old, &sz, in TEST_BEGIN()
|
D | hooks.c | 20 assert_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); in TEST_BEGIN() 28 assert_d_eq(3, func_to_hook(1, 2), "Hooking changed return value."); in TEST_BEGIN()
|
D | prof_accum.c | 35 assert_d_eq(mallctl("prof.dump", NULL, NULL, NULL, 0), in thd_start() 61 assert_d_eq(mallctl("prof.active", NULL, NULL, (void *)&active, in TEST_BEGIN()
|
D | fork.c | 39 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, NULL, 0), in TEST_BEGIN() 45 assert_d_eq(mallctl("thread.arena", (void *)&old_arena_ind, &sz, in TEST_BEGIN()
|
D | size_classes.c | 10 assert_d_eq(mallctl("arenas.nlextents", (void *)&nlextents, &sz, NULL, in get_max_size_class() 14 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in get_max_size_class() 19 assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz, in get_max_size_class()
|
D | stats_print.c | 689 assert_d_eq(parser->token.token_type, TOKEN_TYPE_STRING, in parser_parse_pair() 734 assert_d_eq(parser->token.token_type, TOKEN_TYPE_LBRACKET, in parser_parse_array() 750 assert_d_eq(parser->token.token_type, TOKEN_TYPE_STRING, in parser_parse_pairs() 785 assert_d_eq(parser->token.token_type, TOKEN_TYPE_LBRACE, in parser_parse_object() 964 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, in TEST_BEGIN() 970 assert_d_eq(mallctlnametomib("arena.0.destroy", in TEST_BEGIN() 974 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, in TEST_BEGIN()
|
/external/jemalloc_new/test/integration/ |
D | thread_tcache_enabled.c | 7 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, NULL, in thd_start() 12 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 18 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 23 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 28 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 33 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 39 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 45 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 51 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start() 57 assert_d_eq(mallctl("thread.tcache.enabled", (void *)&e0, &sz, in thd_start()
|
D | extent.c | 13 assert_d_eq(ret, 0, "Unexpected mallctl error"); in check_background_thread_enabled() 30 assert_d_eq(mallctl("arenas.lextent.0.size", (void *)&large0, &sz, NULL, in test_extent_body() 32 assert_d_eq(mallctl("arenas.lextent.1.size", (void *)&large1, &sz, NULL, in test_extent_body() 34 assert_d_eq(mallctl("arenas.lextent.2.size", (void *)&large2, &sz, NULL, in test_extent_body() 39 assert_d_eq(mallctlnametomib("arena.0.purge", purge_mib, &purge_miblen), in test_extent_body() 55 assert_d_eq(mallctlbymib(purge_mib, purge_miblen, NULL, NULL, NULL, 0), in test_extent_body() 78 assert_d_eq(mallctlbymib(purge_mib, purge_miblen, NULL, NULL, NULL, 0), in test_extent_body() 113 assert_d_eq(mallctl("opt.narenas", (void *)&narenas, &sz, NULL, 0), in test_manual_hook_auto_arena() 121 assert_d_eq(mallctlnametomib("arena.0.extent_hooks", hooks_mib, in test_manual_hook_auto_arena() 127 assert_d_eq(mallctlbymib(hooks_mib, hooks_miblen, (void *)&old_hooks, in test_manual_hook_auto_arena() [all …]
|
D | overflow.c | 10 assert_d_eq(mallctl("arenas.nlextents", (void *)&nlextents, &sz, NULL, in TEST_BEGIN() 14 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in TEST_BEGIN() 19 assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz, in TEST_BEGIN()
|
D | MALLOCX_ARENA.c | 21 assert_d_eq(mallctl("arenas.create", (void *)&arena_ind, &sz, NULL, 0), in thd_start() 32 assert_d_eq(mallctlnametomib("arena.0.dss", mib, &miblen), 0, in thd_start() 35 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, (void *)&dss, in thd_start()
|
D | mallocx.c | 9 assert_d_eq(mallctl(cmd, (void *)&ret, &z, NULL, 0), 0, in get_nsizes_impl() 28 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in get_size_impl() 32 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0), in get_size_impl() 50 assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, in purge()
|
D | posix_memalign.c | 12 assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0, in purge() 21 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, in TEST_BEGIN()
|