Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/code/commandline.lisp
    --- a/src/code/commandline.lisp
    +++ b/src/code/commandline.lisp
    @@ -283,8 +283,9 @@
     
     (defswitch "dynamic-space-size" nil
       "Specifies the number of megabytes that should be allocated to the
    -  heap.  If not specified, a platform-specific default is used.  The
    -  actual maximum allowed heap size is platform-specific."
    +  heap.  If not specified, a platform-specific default is used.  If 0,
    +  the platform-specific maximum heap size is used.  The actual maximum
    +  allowed heap size is platform-specific."
       "megabytes")
     
     (defswitch "read-only-space-size" nil
    

  • src/lisp/lisp.c
    --- a/src/lisp/lisp.c
    +++ b/src/lisp/lisp.c
    @@ -622,7 +622,16 @@ main(int argc, const char *argv[], const char *envp[])
     		exit(1);
     	    }
     #ifndef sparc
    -	    dynamic_space_size = atoi(str) * 1024 * 1024;
    +	    dynamic_space_size = atoi(str);
    +
    +	    /*
    +	     * A size of 0 means using the largest possible space
    +	     */
    +	    if (dynamic_space_size == 0) {
    +		dynamic_space_size = DYNAMIC_SPACE_SIZE;
    +	    } else {
    +		dynamic_space_size *= 1024 * 1024;
    +	    }
     #else
     	    {
     		int val;
    @@ -646,6 +655,9 @@ main(int argc, const char *argv[], const char *envp[])
     			    "Note:  Rounding dynamic-space-size from %d MB to %d MB\n",
     			    val, dynamic_space_size);
     		}
    +		if (dynamic_space_size == 0) {
    +		    dynamic_space_size = DYNAMIC_SPACE_SIZE;
    +		}
     		dynamic_space_size *= 1024 * 1024;
     	    }
     #endif