[Git][cmucl/cmucl][master] If -dynamic-space-size is 0, use the max heap.
Raymond Toy
rtoy at common-lisp.net
Thu Jan 7 05:01:48 UTC 2016
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
a5805ca0 by Raymond Toy at 2016-01-06T21:00:07Z
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.
- - - - -
2 changed files:
- src/code/commandline.lisp
- src/lisp/lisp.c
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
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/a5805ca073019b470b8b21ac7ae5e0ebf0843bab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20160107/1e969cfe/attachment.html>
More information about the cmucl-cvs
mailing list