Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment