Skip to content
Snippets Groups Projects
Commit 0d71a1cd authored by dtc's avatar dtc
Browse files

Revise the address map to better utilise the address space, allowing

larger heaps and stacks:

* There is now the potential for up to 2.75GB dynamic space on
FreeBSD, and 1.75GB on linux.  Since GENCGC statically allocates page
tables the default size is set at just 1GB.

* The Read-only and Static spaces have been increased to 256MB
allowing larger heaps to be purified. The Read-only and Static spaces
are in the same locations for both the FreeBSD and Linux ports to
avoid unnecessary binary incompatibility.

* The Control stack and Binking stack now have room for upto 128MB,
supporting deeply nested algorithms, and potentially giving room for
subdivision for thread stacks.

* There is a reserve for the FreeBSD static libraries in the event
that the FreeBSD lisp binary is dynamically linked, and the foreign
segment size for FreeBSD is now 32MB, up from just 4MB.

* There is now significantly more room for C allocated memory, roughly
128M on Linux and 224M on FreeBSD.
parent 036a3c7d
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.28 1998/05/01 01:21:37 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.29 1998/08/30 04:56:49 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -25,10 +25,10 @@
#+hppa (defconstant foreign-segment-start #x10C00000)
#+hppa (defconstant foreign-segment-size #x00400000)
#+(and (not linux) x86)
(defconstant foreign-segment-start #x7000000) ; just an unused space
#+(and (not linux) x86)
(defconstant foreign-segment-size #x00400000)
#+(and freebsd x86)
(defconstant foreign-segment-start #x0E000000)
#+(and freebsd x86)
(defconstant foreign-segment-size #x02000000)
(defvar *previous-linked-object-file* nil)
#-(or linux irix)
......
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.11 1998/06/07 17:56:16 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/parms.lisp,v 1.12 1998/08/30 04:56:50 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -173,14 +173,14 @@
;;; Where to put the different spaces.
;;;
(defparameter target-read-only-space-start #x01000000)
(defparameter target-static-space-start #x05000000)
(defparameter target-dynamic-space-start #x09000000)
(defparameter target-read-only-space-start #x10000000)
(defparameter target-static-space-start #x28000000)
(defparameter target-dynamic-space-start #x48000000)
;;; Given that NIL is the first things allocated in static space, we
;;; know its value at compile time:
;;;
(defparameter nil-value #x0500000B)
(defparameter nil-value #x2800000B)
;;;; Other random constants.
......
/*
*
* This code was written as part of the CMU Common Lisp project at
* Carnegie Mellon University, and has been placed in the public domain.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-validate.h,v 1.7 1998/08/30 04:56:49 dtc Exp $
*
*/
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain.
/*
* Address map:
*
* FreeBSD:
* 0x00000000->0x0E000000 224M C program and memory allocation.
* 0x0E000000->0x10000000 32M Foreign segment.
* 0x10000000->0x20000000 256M Read-Only Space.
* 0x20000000->0x28000000 128M Reserved for shared libraries.
* 0x28000000->0x38000000 256M Static Space.
* 0x38000000->0x40000000 128M Binding stack growing up.
* 0x40000000->0x48000000 128M Control stack growing down.
* 0x48000000->0xC8000000 2GB Dynamic Space.
* 0xE0000000-> 256M C stack - Alien stack.
* Linux:
* 0x00000000->0x08000000 128M Unused.
* 0x08000000->0x10000000 128M C program and memory allocation.
* 0x10000000->0x20000000 256M Read-Only Space.
* 0x20000000->0x28000000 128M Binding stack growing up.
* 0x28000000->0x38000000 256M Static Space.
* 0x38000000->0x40000000 128M Control stack growing down.
* 0x40000000->0x48000000 128M Reserved for shared libraries.
* 0x48000000->0xB8000000 1.75G Dynamic Space.
*
*/
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/x86-validate.h,v 1.6 1998/05/27 03:20:22 dtc Exp $
*/
#define READ_ONLY_SPACE_START (0x10000000)
#define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
#define STATIC_SPACE_START (0x28000000)
#define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
#define READ_ONLY_SPACE_START (0x01000000)
#ifdef GENCGC
#define READ_ONLY_SPACE_SIZE (0x02800000) /* 40MB */
#else
#define READ_ONLY_SPACE_SIZE (0x01800000) /* 24MB */
#ifdef __FreeBSD__
#define BINDING_STACK_START (0x38000000)
#define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
#define CONTROL_STACK_START (0x40000000)
#define CONTROL_STACK_SIZE (0x08000000) /* 128MB */
#endif
#define STATIC_SPACE_START (0x05000000)
#ifdef GENCGC
#define STATIC_SPACE_SIZE (0x00fff000) /* 16MB - 1 page */
#else
#define STATIC_SPACE_SIZE (0x02fff000) /* 48MB - 1 page */
#ifdef __linux__
#define BINDING_STACK_START (0x20000000)
#define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
#define CONTROL_STACK_START (0x30001000)
#define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
#endif
#define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
/* Note that GENCGC only uses dynamic_space 0. */
#define DYNAMIC_0_SPACE_START (0x09000000)
#define DYNAMIC_0_SPACE_START (0x48000000)
#ifdef GENCGC
#define DYNAMIC_1_SPACE_START (0x29000000)
#define DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
#ifdef __FreeBSD__
#define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
#endif
#ifdef __linux__
#define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 1.75GB */
#endif
#else
#define DYNAMIC_1_SPACE_START (0x0d000000)
#define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
#endif
/* Note that i386 has the control stack growing from high to low
* addresses, as opposed to the control stack used on the other RISC
* systems for which the stack grows the other way. */
#define CONTROL_STACK_START (0x50000000)
#define CONTROL_STACK_SIZE (0x00100000)
#define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
#define BINDING_STACK_START (0x60000000)
#define BINDING_STACK_SIZE (0x00100000)
#define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)
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