6 * This software is part of the SBCL system. See the README file for
9 * This software is derived from the CMU CL system, which was
10 * written at Carnegie Mellon University and released into the
11 * public domain. The software is in the public domain and is
12 * provided with absolutely no warranty. See the COPYING and CREDITS
13 * files for more information.
26 ensure_space(lispobj
*start
, unsigned long size
)
28 if (os_validate((os_vm_address_t
)start
,(os_vm_size_t
)size
)==NULL
) {
30 "ensure_space: failed to validate %ld bytes at 0x%08lx\n",
32 (unsigned long)start
);
39 static os_vm_address_t holes
[] = HOLES
;
46 for (i
= 0; i
< sizeof(holes
)/sizeof(holes
[0]); i
++) {
47 if (os_validate(holes
[i
], HOLE_SIZE
) == NULL
) {
49 "make_holes: failed to validate %ld bytes at 0x%08X\n",
51 (unsigned long)holes
[i
]);
54 os_protect(holes
[i
], HOLE_SIZE
, 0);
63 printf("validating memory ...");
67 ensure_space( (lispobj
*)READ_ONLY_SPACE_START
, READ_ONLY_SPACE_SIZE
);
68 ensure_space( (lispobj
*)STATIC_SPACE_START
, STATIC_SPACE_SIZE
);
69 #ifdef LISP_FEATURE_GENCGC
70 ensure_space( (lispobj
*)DYNAMIC_SPACE_START
, DYNAMIC_SPACE_SIZE
);
72 ensure_space( (lispobj
*)DYNAMIC_0_SPACE_START
, DYNAMIC_SPACE_SIZE
);
73 ensure_space( (lispobj
*)DYNAMIC_1_SPACE_START
, DYNAMIC_SPACE_SIZE
);
85 void protect_control_stack_guard_page(pid_t t_id
, int protect_p
) {
86 struct thread
*th
= find_thread_by_pid(t_id
);
87 os_protect(CONTROL_STACK_GUARD_PAGE(th
),
88 os_vm_page_size
,protect_p
?
89 (OS_VM_PROT_READ
|OS_VM_PROT_EXECUTE
) : OS_VM_PROT_ALL
);