Commit a5805ca0 authored by Raymond Toy's avatar Raymond Toy
Browse files

If -dynamic-space-size is 0, use the max heap.

If the user specifies -dynamic-space-size 0, then use the
platform-specific maximum heap size.

Update the docstring for the switch too.
parent c7e71ee2
Loading
Loading
Loading
Loading
+3 −2
Changes for src/code/commandline.lisp: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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
+13 −1
Changes for src/lisp/lisp.c: 13 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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