Raymond Toy pushed to branch rtoy-mmap-anon-control-and-binding-stacks at cmucl / cmucl

Commits:

3 changed files:

Changes:

  • src/lisp/save.c
    --- a/src/lisp/save.c
    +++ b/src/lisp/save.c
    @@ -136,11 +136,9 @@ save(char *filename, lispobj init_function, int sse2_mode)
         }
         printf("[Undoing binding stack... ");
         fflush(stdout);
    -#if 0
    -    unbind_to_here((lispobj *) BINDING_STACK_START);
    -#else
    +
         unbind_to_here((lispobj *) binding_stack);
    -#endif
    +
         SetSymbolValue(CURRENT_CATCH_BLOCK, 0);
         SetSymbolValue(CURRENT_UNWIND_PROTECT_BLOCK, 0);
         SetSymbolValue(EVAL_STACK_TOP, 0);
    @@ -282,11 +280,9 @@ save_executable(char *filename, lispobj init_function)
     
         printf("[Undoing binding stack... ");
         fflush(stdout);
    -#if 0
    -    unbind_to_here((lispobj *)BINDING_STACK_START);
    -#else
    +
         unbind_to_here((lispobj *)binding_stack);
    -#endif
    +
         SetSymbolValue(CURRENT_CATCH_BLOCK, 0);
         SetSymbolValue(CURRENT_UNWIND_PROTECT_BLOCK, 0);
         SetSymbolValue(EVAL_STACK_TOP, 0);
    

  • src/lisp/solaris-os.c
    --- a/src/lisp/solaris-os.c
    +++ b/src/lisp/solaris-os.c
    @@ -409,7 +409,9 @@ os_vm_address_t round_up_sparse_size(os_vm_address_t addr)
     /*
      * An array of the start of the spaces which should have holes placed
      * after them.  Must not include the dynamic spaces because the size
    - * of the dynamic space can be controlled from the command line.
    + * of the dynamic space can be controlled from the command line.  Also
    + * must not include the binding and control stacks.  They're handled
    + * below.
      */
     static os_vm_address_t spaces[] = {
         READ_ONLY_SPACE_START, STATIC_SPACE_START
    

  • src/lisp/validate.c
    --- a/src/lisp/validate.c
    +++ b/src/lisp/validate.c
    @@ -124,7 +124,7 @@ validate_stacks()
         ensure_space(control_stack, control_stack_size);
     #else
         /* Map the conrol stack wherever we have space */
    -  control_stack = (lispobj*) os_validate(NULL, control_stack_size);
    +    control_stack = (lispobj*) os_validate(NULL, control_stack_size);
     
     #if (defined(i386) || defined(__x86_64))
         control_stack_end = (void*)control_stack + control_stack_size;
    @@ -136,6 +136,7 @@ validate_stacks()
         binding_stack = (lispobj *) BINDING_STACK_START;
         ensure_space(binding_stack, binding_stack_size);
     #else
    +    /* Map the binding stack wherever we have space */
         binding_stack = (lispobj*) os_validate(NULL, binding_stack_size);
     #endif
     #ifdef sparc