X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fruntime%2Fvalidate.c;h=f9b6ab164d59bc29506ca736521c5bb5a8e47bf2;hb=cf4cb9554515c59eddbde38d1cf236339c37f55f;hp=6d768039665d7056b683ad90d55bb034e83369de;hpb=1419c1d2d50f039be46a8667351b7738ac4965e4;p=sbcl.git diff --git a/src/runtime/validate.c b/src/runtime/validate.c index 6d76803..f9b6ab1 100644 --- a/src/runtime/validate.c +++ b/src/runtime/validate.c @@ -16,10 +16,10 @@ #include #include +#include "sbcl.h" #include "runtime.h" #include "os.h" #include "globals.h" -#include "sbcl.h" #include "validate.h" static void @@ -30,32 +30,12 @@ ensure_space(lispobj *start, unsigned long size) "ensure_space: failed to validate %ld bytes at 0x%08lx\n", size, (unsigned long)start); + fprintf(stderr, + "(hint: Try \"ulimit -a\"; maybe you should increase memory limits.)\n"); exit(1); } } -#ifdef HOLES - -static os_vm_address_t holes[] = HOLES; - -static void -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); - } -} -#endif - void validate(void) { @@ -72,25 +52,16 @@ validate(void) ensure_space( (lispobj *)DYNAMIC_0_SPACE_START , DYNAMIC_SPACE_SIZE); ensure_space( (lispobj *)DYNAMIC_1_SPACE_START , DYNAMIC_SPACE_SIZE); #endif -#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK - ensure_space( (lispobj *) ALTERNATE_SIGNAL_STACK_START, SIGSTKSZ); -#endif -#ifdef HOLES - make_holes(); -#endif - #ifdef PRINTNOISE printf(" done.\n"); #endif } void protect_control_stack_guard_page(pid_t t_id, int protect_p) { - struct thread *th= find_thread_by_pid(t_id); -#if 0 + struct thread *th = find_thread_by_pid(t_id); os_protect(CONTROL_STACK_GUARD_PAGE(th), os_vm_page_size,protect_p ? (OS_VM_PROT_READ|OS_VM_PROT_EXECUTE) : OS_VM_PROT_ALL); -#endif }