T_GLOBAL_META(
T_META_NAMESPACE("xnu.vm"),
- T_META_CHECK_LEAKS(false)
-);
+ T_META_CHECK_LEAKS(false),
+ T_META_RUN_CONCURRENTLY(true)
+ );
static void run_test(void);
-static void run_test(void)
+static void
+run_test(void)
{
kern_return_t kr;
uint64_t size, i;
const char kalloc_str[] = "kalloc.";
kr = mach_memory_info(mach_host_self(),
- &name, &nameCnt, &info, &infoCnt,
- &wiredInfo, &wiredInfoCnt);
+ &name, &nameCnt, &info, &infoCnt,
+ &wiredInfo, &wiredInfoCnt);
T_QUIET; T_ASSERT_MACH_SUCCESS(kr, "mach_memory_info");
T_QUIET; T_ASSERT_EQ(nameCnt, infoCnt, "zone name and info counts don't match");
if ((name != NULL) && (nameCnt != 0)) {
kr = vm_deallocate(mach_task_self(), (vm_address_t) name,
- (vm_size_t) (nameCnt * sizeof *name));
+ (vm_size_t) (nameCnt * sizeof *name));
T_QUIET; T_ASSERT_MACH_SUCCESS(kr, "vm_deallocate name");
}
if ((info != NULL) && (infoCnt != 0)) {
kr = vm_deallocate(mach_task_self(), (vm_address_t) info,
- (vm_size_t) (infoCnt * sizeof *info));
+ (vm_size_t) (infoCnt * sizeof *info));
T_QUIET; T_ASSERT_MACH_SUCCESS(kr, "vm_deallocate info");
}
if ((wiredInfo != NULL) && (wiredInfoCnt != 0)) {
kr = vm_deallocate(mach_task_self(), (vm_address_t) wiredInfo,
- (vm_size_t) (wiredInfoCnt * sizeof *wiredInfo));
+ (vm_size_t) (wiredInfoCnt * sizeof *wiredInfo));
T_QUIET; T_ASSERT_MACH_SUCCESS(kr, "vm_deallocate wiredInfo");
}
}
T_DECL( verify_kalloc_config,
- "verifies that the kalloc zones are configured correctly",
- T_META_ASROOT(true))
+ "verifies that the kalloc zones are configured correctly",
+ T_META_ASROOT(true))
{
run_test();
}
-