darling-xnu/tests/vm_set_max_addr_helper.c
2023-05-16 21:41:14 -07:00

19 lines
311 B
C

#include <mach/mach_init.h>
#include <mach/mach_vm.h>
#include <stdlib.h>
int
main(void)
{
kern_return_t kr;
mach_vm_address_t addr = 50ULL * 1024ULL * 1024ULL * 1024ULL;
kr = mach_vm_allocate(current_task(), &addr, 4096, VM_FLAGS_FIXED);
if (kr == KERN_SUCCESS) {
return 0;
} else {
return 1;
}
}