Skip to content
Snippets Groups Projects
Commit 9e4c9d0a authored by Raymond Toy's avatar Raymond Toy
Browse files

Reduce maximum heap size for Linux.

According to the message from Chisheng Huang on cmucl-help,
2016-02-27, 32-bit Ubuntu 11.10 (in VirtualBox) cannot use the full
heap space.  There's something already allocated at address 0xb7b82000,
so limit the max heap to address 0xb7b80000, for a total of 1530 MB
instead of 1632 MB.

(It would be nice to be able to detect this somehow.)
parent 8d6a01fb
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,21 @@
* 0x38000000->0x40000000 128M Control stack growing down.
* 0x40000000->0x48000000 128M Reserved for shared libraries.
* 0x58000000->0x58100000 16M Foreign Linkage Table
* 0x58100000->0xBE000000 1631M Dynamic Space.
* 0xBFFF0000->0xC0000000 Unknown Linux mapping
* 0x58100000->0xB7B00000 1530M Dynamic Space.
* 0xB7B82000->0xC0000000 Unknown Linux mapping, including stack
*
*
* (Note: 0x58000000 allows us to run on a Linux system on an AMD
* x86-64. Hence we have a gap of unused memory starting at
* 0x48000000.)
*
* It appears as if the actual upper limit depends on the particular
* Linux distribution. Ubuntu 11.10 (32-bit) appears to have
* something mapped at 0xb78b2000, so we can't allocate the dynamic
* space past that. That results in a max heap size of 1530 MB.
* However, Fedora 22 ther appears to be nothing mapped there. In
* fact it appears to be free all the way to 0xf7c1b000. That would
* allow a heap of size 2555 MB.
*/
#define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
......@@ -48,7 +57,7 @@
#define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
#ifdef GENCGC
#define DYNAMIC_SPACE_SIZE (0x66000000) /* 1.632GB */
#define DYNAMIC_SPACE_SIZE (0x5FA00000) /* 1.530GB */
#else
#define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
#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