512Mb for 32-bit platforms, 1Gb for 64-bit ones.
(OpenBSD/x86-64 is the exception using 444Mb to fit under default ulimits.)
To configure SBCL with a non-standard default dynamic-space size,
use the --dynamic-space-size option:
- $ sh make.sh --dynamic-space-size=1Gb
- $ sh make.sh --dynamic-space-size=500Mb
+ $ sh make.sh --dynamic-space-size=4Gb
+ $ sh make.sh --dynamic-space-size=800Mb
If mega- or gigabytes are not specified, the number is taken to be
- in megabytes. The standard default is platform specific.
+ in megabytes. The standard default is 512Mb for 32-bit systems, and
+ 1Gb for 64-bit systems (with the exception of OpenBSD where 444Mb
+ are used to fit under default ulimits.)
If you don't already have an SBCL binary installed as "sbcl" on your
system, you'll need to tell make.sh what Lisp to use as the
* GC-related enhancements and bug fixes:
** --dynamic-space-size and --control-stack-size now understand Kb, Mb,
and Gb suffixes. Default is megabytes as before.
+ ** Default dynamic space size on all GENCGC platforms is now 512Mb for
+ 32-bit systems, and 1Gb for 64-bit systems. (OpenBSD/x86-64 is the only
+ exception, defaulting to mere 444Mb to fit under default ulimits.) The
+ new defaults are in place to prevent hitting swap on low-end systems.
+ Use build-time option --dynamic-space-size to build an SBCL with
+ another default, or the runtime option to adjust the size at startup: a
+ good size is at most equal to the amount of physical memory the system
+ has.
** on GENCGC systems nursery and generation sizes now default to 5% of
dynamic-space size.
** on 64-bit systems setting the nursery size above 4Gb now
(in-package "SB!VM")
-(def!macro !configure-dynamic-space-end (default)
+(def!macro !configure-dynamic-space-end (&optional default)
(with-open-file (f "output/dynamic-space-size.txt")
(let ((line (read-line f)))
(multiple-value-bind (number end)
(expt 2 30))
(t
(error "Invalid --dynamic-space-size=~A" line)))))
- `(+ dynamic-space-start ,(* number mult)))
- default)))))
+ `(+ dynamic-space-start ,(* number mult))))
+ (or default
+ `(+ dynamic-space-start
+ (ecase n-word-bits
+ (32 (expt 2 29))
+ (64 (expt 2 30)))))))))
(defparameter *c-callable-static-symbols*
'(sub-gc
#!+gencgc
(progn
(def!constant dynamic-space-start #x4f000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x7efff000)))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end)))
#!-gencgc
(progn
(def!constant dynamic-0-space-start #x4f000000)
#!+gencgc
(progn
(def!constant dynamic-space-start #x4f000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x7efff000)))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end)))
#!-gencgc
(progn
(def!constant dynamic-0-space-start #x4f000000)
#!+gencgc
(progn
(def!constant dynamic-space-start #x4f000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x6afff000)))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end)))
#!-gencgc
(progn
(def!constant dynamic-0-space-start #x4f000000)
#!+gencgc
(progn
(def!constant dynamic-space-start #x10000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x6ffff000)))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end)))
#!-gencgc
(progn
(def!constant dynamic-0-space-start #x10000000)
(def!constant dynamic-space-start #x1000000000)
#!-openbsd
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x11ffff0000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
#!+openbsd
;; This is lower on OpenBSD to allow SBCL to run under the default
;; 512M data size limit.
(def!constant static-space-end #x221ff000)
(def!constant dynamic-space-start #x22300000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x42300000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x22200000)
(def!constant linkage-table-space-end #x222ff000))
(def!constant static-space-end #x011ff000)
(def!constant dynamic-space-start #x09000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x29000000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x01200000)
(def!constant linkage-table-space-end #x012ff000))
(def!constant static-space-end #x201ff000)
(def!constant dynamic-space-start #x48000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #xA0000000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x20200000)
(def!constant linkage-table-space-end #x202ff000))
(def!constant static-space-end #x011ff000)
(def!constant dynamic-space-start #x58000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x98000000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x01200000)
(def!constant linkage-table-space-end #x012ff000))
(def!constant static-space-end #x1b1ff000)
(def!constant dynamic-space-start #x40000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x5bfff000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x1b200000)
(def!constant linkage-table-space-end #x1b2ff000))
(def!constant static-space-end #x201ff000)
(def!constant dynamic-space-start #x60000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x98000000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
;; In CMUCL: 0xB0000000->0xB1000000
(def!constant linkage-table-space-start #x20200000)
(def!constant static-space-end #x041ff000)
(def!constant dynamic-space-start #x10000000)
- (def!constant dynamic-space-end (!configure-dynamic-space-end #x6ffff000))
+ (def!constant dynamic-space-end (!configure-dynamic-space-end))
(def!constant linkage-table-space-start #x04200000)
(def!constant linkage-table-space-end #x042ff000))