-make_holes(void)
-{
- int i;
-
- for (i = 0; i < sizeof(holes)/sizeof(holes[0]); i++) {
- if (os_validate(holes[i], HOLE_SIZE) == NULL) {
- fprintf(stderr,
- "make_holes: failed to validate %ld bytes at 0x%08X\n",
- HOLE_SIZE,
- (unsigned long)holes[i]);
- exit(1);
- }
- os_protect(holes[i], HOLE_SIZE, 0);
+ensure_undefined_alien(void) {
+ os_vm_address_t start = os_validate(NULL, os_vm_page_size);
+ if (start) {
+ os_protect(start, os_vm_page_size, OS_VM_PROT_NONE);
+ undefined_alien_address = start;
+ } else {
+ lose("could not allocate guard page for undefined alien");