/external/jemalloc_new/test/unit/ |
D | mallctl.c | 33 size_t mib[1]; in TEST_BEGIN() local 36 miblen = sizeof(mib)/sizeof(size_t); in TEST_BEGIN() 37 assert_d_eq(mallctlnametomib("no_such_name", mib, &miblen), ENOENT, in TEST_BEGIN() 45 size_t mib[1]; in TEST_BEGIN() local 48 miblen = sizeof(mib)/sizeof(size_t); 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() 56 miblen = sizeof(mib)/sizeof(size_t); in TEST_BEGIN() 57 assert_d_eq(mallctlnametomib("epoch", mib, &miblen), 0, in TEST_BEGIN() 60 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, (void *)&epoch, in TEST_BEGIN() [all …]
|
D | pack.c | 29 size_t mib[4]; in binind_compute() local 30 size_t miblen = sizeof(mib)/sizeof(size_t); in binind_compute() 33 assert_d_eq(mallctlnametomib("arenas.bin.0.size", mib, in binind_compute() 35 mib[2] = (size_t)i; in binind_compute() 38 assert_d_eq(mallctlbymib(mib, miblen, (void *)&size, &sz, NULL, in binind_compute() 54 size_t mib[4]; in nregs_per_run_compute() local 55 size_t miblen = sizeof(mib)/sizeof(size_t); in nregs_per_run_compute() 57 assert_d_eq(mallctlnametomib("arenas.bin.0.nregs", mib, &miblen), 0, in nregs_per_run_compute() 59 mib[2] = (size_t)binind; in nregs_per_run_compute() 61 assert_d_eq(mallctlbymib(mib, miblen, (void *)&nregs, &sz, NULL, in nregs_per_run_compute() [all …]
|
D | decay.c | 44 size_t mib[3]; in do_arena_create() local 45 size_t miblen = sizeof(mib)/sizeof(size_t); in do_arena_create() 47 assert_d_eq(mallctlnametomib("arena.0.dirty_decay_ms", mib, &miblen), in do_arena_create() 49 mib[1] = (size_t)arena_ind; 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() 56 mib[1] = (size_t)arena_ind; in do_arena_create() 57 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, in do_arena_create() 66 size_t mib[3]; in do_arena_destroy() local 67 size_t miblen = sizeof(mib)/sizeof(size_t); in do_arena_destroy() [all …]
|
D | extent_quantize.c | 6 size_t mib[4]; in TEST_BEGIN() local 7 size_t miblen = sizeof(mib) / sizeof(size_t); in TEST_BEGIN() 18 assert_d_eq(mallctlnametomib("arenas.bin.0.slab_size", mib, &miblen), 0, in TEST_BEGIN() 21 mib[2] = i; in TEST_BEGIN() 23 assert_d_eq(mallctlbymib(mib, miblen, (void *)&extent_size, &sz, in TEST_BEGIN() 41 size_t mib[4]; in TEST_BEGIN() local 42 size_t miblen = sizeof(mib) / sizeof(size_t); in TEST_BEGIN() 57 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in TEST_BEGIN() 62 mib[2] = i; in TEST_BEGIN() 64 assert_d_eq(mallctlbymib(mib, miblen, (void *)&lextent_size, in TEST_BEGIN()
|
D | retained.c | 25 size_t mib[3]; in do_arena_destroy() local 28 miblen = sizeof(mib)/sizeof(size_t); in do_arena_destroy() 29 assert_d_eq(mallctlnametomib("arena.0.destroy", mib, &miblen), 0, in do_arena_destroy() 31 mib[1] = (size_t)arena_ind; in do_arena_destroy() 32 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in do_arena_destroy() 45 size_t mib[4]; in do_get_size_impl() local 46 size_t miblen = sizeof(mib) / sizeof(size_t); in do_get_size_impl() 49 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in do_get_size_impl() 51 mib[2] = arena_ind; in do_get_size_impl() 53 assert_d_eq(mallctlbymib(mib, miblen, (void *)&size, &z, NULL, 0), in do_get_size_impl()
|
D | arena_reset.c | 36 size_t mib[4]; in get_size_impl() local 40 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in get_size_impl() 42 mib[2] = ind; in get_size_impl() 44 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0), in get_size_impl() 162 size_t mib[3]; in do_arena_reset_destroy() local 165 miblen = sizeof(mib)/sizeof(size_t); in do_arena_reset_destroy() 166 assert_d_eq(mallctlnametomib(name, mib, &miblen), 0, in do_arena_reset_destroy() 168 mib[1] = (size_t)arena_ind; in do_arena_reset_destroy() 169 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, NULL, 0), 0, in do_arena_reset_destroy() 198 size_t mib[3]; in arena_i_initialized() local [all …]
|
D | size_classes.c | 6 size_t mib[4]; in get_max_size_class() local 13 miblen = sizeof(mib) / sizeof(size_t); in get_max_size_class() 14 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in get_max_size_class() 16 mib[2] = nlextents - 1; in get_max_size_class() 19 assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz, in get_max_size_class()
|
/external/catch2/include/internal/ |
D | catch_debugger.cpp | 38 int mib[4]; in isDebuggerActive() local 50 mib[0] = CTL_KERN; in isDebuggerActive() 51 mib[1] = KERN_PROC; in isDebuggerActive() 52 mib[2] = KERN_PROC_PID; in isDebuggerActive() 53 mib[3] = getpid(); in isDebuggerActive() 58 if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) { in isDebuggerActive()
|
/external/jemalloc_new/src/ |
D | ctl.c | 50 static int n##_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, \ 55 const size_t *mib, size_t miblen, size_t i); 1178 size_t mib[CTL_MAX_DEPTH]; in ctl_byname() local 1187 ret = ctl_lookup(tsd_tsdn(tsd), name, nodes, mib, &depth); in ctl_byname() 1194 ret = node->ctl(tsd, mib, depth, oldp, oldlenp, newp, newlen); in ctl_byname() 1219 ctl_bymib(tsd_t *tsd, const size_t *mib, size_t miblen, void *oldp, in ctl_bymib() argument 1237 if (node->nchildren <= mib[i]) { in ctl_bymib() 1241 node = ctl_named_children(node, mib[i]); in ctl_bymib() 1247 node = inode->index(tsd_tsdn(tsd), mib, miblen, mib[i]); in ctl_bymib() 1257 ret = node->ctl(tsd, mib, miblen, oldp, oldlenp, newp, newlen); in ctl_bymib() [all …]
|
/external/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/ |
D | sysctl.cpp | 21 int mib[] = {CTL_KERN, KERN_OSTYPE}; in test_sysctl() local 22 int rv = sysctl(mib, __arraycount(mib), buf, &len, NULL, 0); in test_sysctl() 38 int mib[CTL_MAXNAME]; in test_sysctlnametomib() local 39 size_t mib_len = __arraycount(mib); in test_sysctlnametomib() 40 int rv = sysctlnametomib("kern.ostype", &mib[0], &mib_len); in test_sysctlnametomib() 45 rv = sysctl(mib, mib_len, buf, &len, NULL, 0); in test_sysctlnametomib()
|
/external/mesa3d/src/util/ |
D | os_misc.c | 153 int mib[2]; in os_get_total_physical_memory() 155 mib[0] = CTL_HW; in os_get_total_physical_memory() 157 mib[1] = HW_MEMSIZE; in os_get_total_physical_memory() 159 mib[1] = HW_PHYSMEM64; in os_get_total_physical_memory() 161 mib[1] = HW_REALMEM; in os_get_total_physical_memory() 163 mib[1] = HW_PHYSMEM; in os_get_total_physical_memory() 168 return (sysctl(mib, 2, size, &len, NULL, 0) == 0); in os_get_total_physical_memory() 219 int mib[] = { CTL_HW, HW_USERMEM64 }; in os_get_available_system_memory() 221 int mib[] = { CTL_HW, HW_USERMEM }; in os_get_available_system_memory() 227 if (sysctl(mib, 2, &mem_available, &len, NULL, 0) == -1) in os_get_available_system_memory()
|
/external/jemalloc_new/test/integration/ |
D | overflow.c | 5 size_t mib[4]; in TEST_BEGIN() local 13 miblen = sizeof(mib) / sizeof(size_t); in TEST_BEGIN() 14 assert_d_eq(mallctlnametomib("arenas.lextent.0.size", mib, &miblen), 0, in TEST_BEGIN() 16 mib[2] = nlextents - 1; in TEST_BEGIN() 19 assert_d_eq(mallctlbymib(mib, miblen, (void *)&max_size_class, &sz, in TEST_BEGIN()
|
D | MALLOCX_ARENA.c | 25 size_t mib[3]; in thd_start() local 26 size_t miblen = sizeof(mib) / sizeof(size_t); in thd_start() 32 assert_d_eq(mallctlnametomib("arena.0.dss", mib, &miblen), 0, in thd_start() 34 mib[1] = arena_ind; in thd_start() 35 assert_d_eq(mallctlbymib(mib, miblen, NULL, NULL, (void *)&dss, in thd_start()
|
D | mallocx.c | 24 size_t mib[4]; in get_size_impl() local 28 assert_d_eq(mallctlnametomib(cmd, mib, &miblen), in get_size_impl() 30 mib[2] = ind; in get_size_impl() 32 assert_d_eq(mallctlbymib(mib, miblen, (void *)&ret, &z, NULL, 0), in get_size_impl()
|
/external/ltp/testcases/open_posix_testsuite/include/ |
D | ncpu.h | 44 int mib[2]; in get_ncpu() local 46 mib[0] = CTL_HW; in get_ncpu() 47 mib[1] = HW_NCPU; in get_ncpu() 48 sysctl(mib, 2, &ncpu, &len, NULL, 0); in get_ncpu()
|
/external/libchrome/base/debug/ |
D | debugger_posix.cc | 82 int mib[] = { in BeingDebugged() local 99 if (sysctl(mib, arraysize(mib), NULL, &info_size, NULL, 0) < 0) in BeingDebugged() 102 mib[5] = (info_size / sizeof(struct kinfo_proc)); in BeingDebugged() 105 int sysctl_result = sysctl(mib, arraysize(mib), &info, &info_size, NULL, 0); in BeingDebugged()
|
/external/llvm-project/compiler-rt/test/sanitizer_common/TestCases/NetBSD/ |
D | sysctlgetmibinfo.cpp | 13 int mib[CTL_MAXNAME]; in test_sysctlgetmibinfo() local 14 unsigned int mib_len = __arraycount(mib); in test_sysctlgetmibinfo() 15 int rv = sysctlgetmibinfo("kern.ostype", &mib[0], &mib_len, NULL, NULL, NULL, in test_sysctlgetmibinfo() 21 rv = sysctl(mib, mib_len, buf, &len, NULL, 0); in test_sysctlgetmibinfo()
|
D | asysctl.cpp | 13 int mib[] = {CTL_KERN, KERN_OSTYPE}; in test_asysctl() local 15 char *buf = (char *)asysctl(mib, __arraycount(mib), &len); in test_asysctl()
|
/external/llvm-project/lldb/source/Host/freebsd/ |
D | Host.cpp | 55 int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ARGS, pid}; in GetFreeBSDProcessArgs() local 59 if (::sysctl(mib, 4, arg_data, &arg_data_size, NULL, 0) != 0) in GetFreeBSDProcessArgs() 74 mib[2] = KERN_PROC_PATHNAME; in GetFreeBSDProcessArgs() 75 if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0) in GetFreeBSDProcessArgs() 121 int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; in GetFreeBSDProcessUserAndGroup() local 128 if (::sysctl(mib, 4, &proc_kinfo, &proc_kinfo_size, NULL, 0) != 0) in GetFreeBSDProcessUserAndGroup() 161 int mib[3] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; in FindProcessesImpl() local 164 if (::sysctl(mib, 3, NULL, &pid_data_size, NULL, 0) != 0) in FindProcessesImpl() 174 if (::sysctl(mib, 3, &kinfos[0], &pid_data_size, NULL, 0) != 0) in FindProcessesImpl()
|
/external/mesa3d/src/gallium/auxiliary/hud/ |
D | hud_cpu.c | 114 int mib[] = { CTL_KERN, KERN_CP_TIME }; in get_cpu_stats() local 116 if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) in get_cpu_stats() 119 int mib[] = { CTL_KERN, KERN_CPTIME }; in get_cpu_stats() local 123 if (sysctl(mib, ARRAY_SIZE(mib), sum_cp_time, &len, NULL, 0) == -1) in get_cpu_stats() 134 int mib[] = { CTL_KERN, KERN_CP_TIME, cpu_index }; in get_cpu_stats() local 137 if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) in get_cpu_stats() 140 int mib[] = { CTL_KERN, KERN_CPTIME2, cpu_index }; in get_cpu_stats() 143 if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) in get_cpu_stats()
|
/external/llvm-project/lldb/source/Host/openbsd/ |
D | Host.cpp | 61 int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ARGS, in GetOpenBSDProcessArgs() local 66 if (::sysctl(mib, 4, arg_data, &arg_data_size, NULL, 0) == 0) { in GetOpenBSDProcessArgs() 120 int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, in GetOpenBSDProcessUserAndGroup() local 124 if (::sysctl(mib, 4, &proc_kinfo, &proc_kinfo_size, NULL, 0) == 0) { in GetOpenBSDProcessUserAndGroup() 147 int mib[3] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; in FindProcessesImpl() local 150 if (::sysctl(mib, 3, NULL, &pid_data_size, NULL, 0) != 0) in FindProcessesImpl() 160 if (::sysctl(mib, 3, &kinfos[0], &pid_data_size, NULL, 0) != 0) in FindProcessesImpl()
|
/external/pcre/dist2/src/sljit/ |
D | sljitWXExecAllocator.c | 79 int mib[3]; in netbsd_se_protected() local 83 mib[0] = CTL_PROC; in netbsd_se_protected() 84 mib[1] = getpid(); in netbsd_se_protected() 85 mib[2] = PROC_PID_PAXFLAGS; in netbsd_se_protected() 87 if (SLJIT_UNLIKELY(sysctl(mib, 3, &paxflags, &len, NULL, 0) < 0)) in netbsd_se_protected()
|
/external/rust/crates/num_cpus/src/ |
D | lib.rs | 241 let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0]; in get_num_cpus() localVariable 243 libc::sysctl(mib.as_mut_ptr(), in get_num_cpus() 263 let mut mib = [libc::CTL_HW, libc::HW_NCPUONLINE, 0, 0]; in get_num_cpus() localVariable 267 rc = libc::sysctl(mib.as_mut_ptr(), in get_num_cpus() 286 let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0]; in get_num_physical_cpus() localVariable 290 rc = libc::sysctl(mib.as_mut_ptr(), in get_num_physical_cpus()
|
/external/mesa3d/src/mesa/x86/ |
D | common_x86.c | 150 int mib[2]; in _mesa_check_os_sse_support() 154 mib[0] = CTL_MACHDEP; in _mesa_check_os_sse_support() 155 mib[1] = CPU_SSE; in _mesa_check_os_sse_support() 157 ret = sysctl(mib, 2, &enabled, &len, NULL, 0); in _mesa_check_os_sse_support()
|
/external/libaom/libaom/third_party/googletest/src/googletest/src/ |
D | gtest-port.cc | 161 int mib[] = { in GetThreadCount() local 171 u_int miblen = sizeof(mib) / sizeof(mib[0]); in GetThreadCount() 174 if (sysctl(mib, miblen, &info, &size, NULL, 0)) { in GetThreadCount() 184 int mib[] = { in GetThreadCount() local 192 u_int miblen = sizeof(mib) / sizeof(mib[0]); in GetThreadCount() 196 if (sysctl(mib, miblen, NULL, &size, NULL, 0)) { in GetThreadCount() 199 mib[5] = size / mib[4]; in GetThreadCount() 202 struct kinfo_proc info[mib[5]]; in GetThreadCount() 203 if (sysctl(mib, miblen, &info, &size, NULL, 0)) { in GetThreadCount() 209 for (int i = 0; i < size / mib[4]; i++) { in GetThreadCount()
|