#include "validate.h"
size_t os_vm_page_size;
-#if defined GENCGC
-#include "gencgc.h"
-#endif
\f
void os_init(void)
{
-
os_vm_page_size = getpagesize();
-
}
/* this is lifted from linux-os.c, so violates OOAO */
*os_context_register_addr(context,reg_ALLOC) -= (1L<<63);
interrupt_handle_pending(context);
- } else if(((addr>=DYNAMIC_0_SPACE_END) && (addr<DYNAMIC_1_SPACE_START)) ||
- ((addr>=DYNAMIC_1_SPACE_END) && (addr<CONTROL_STACK_START))){
- /* there's empty gap between these spaces. This clause needs
- review if the spaces are ever juggled to make this untrue */
- fprintf(stderr, "bad address 0x%p\n",addr);
- lose("ran off end of dynamic space");
} else if (!interrupt_maybe_gc(signal, info, context)) {
- interrupt_handle_now(signal, info, context);
+ if(!handle_control_stack_guard_triggered(context,addr))
+ interrupt_handle_now(signal, info, context);
}
}
void
os_install_interrupt_handlers(void)
{
- undoably_install_low_level_interrupt_handler(SIGSEGV, sigsegv_handler);
+ undoably_install_low_level_interrupt_handler(SIG_MEMORY_FAULT,
+ sigsegv_handler);
}