From: Nikodemus Siivola Date: Sun, 29 May 2005 15:48:37 +0000 (+0000) Subject: 0.9.1.5: bigger dynamic space on PPC plus cleanups X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=986a59ccc87c71f1028b5b1419bd7dc799334cc3;p=sbcl.git 0.9.1.5: bigger dynamic space on PPC plus cleanups * patch by Cyrus Harmon * clean up DYNAMIC-SPACE-START and -END ugliness on cheney-platforms. --- diff --git a/NEWS b/NEWS index 78b7f55..b46ae68 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ changes in sbcl-0.9.2 relative to sbcl-0.9.1: + * dynamic space size on PPC has been increased to 768Mb. (thanks to + Cyrus Harmon) * SB-MOP:ENSURE-CLASS-USING-CLASS now accepts a class as the :METACLASS argument in addition to a class name. (reported by Bruno Haible for CMUCL, patch for CMUCL by Gerd Moellman) diff --git a/src/code/debug-int.lisp b/src/code/debug-int.lisp index f1cd357..fa67ca8 100644 --- a/src/code/debug-int.lisp +++ b/src/code/debug-int.lisp @@ -2012,7 +2012,7 @@ register." (< sb!vm:static-space-start val (* sb!vm:*static-space-free-pointer* sb!vm:n-word-bytes)) - (< sb!vm:dynamic-space-start val + (< (current-dynamic-space-start) val (sap-int (dynamic-space-free-pointer)))))) (make-lisp-obj val) :invalid-object)) diff --git a/src/code/gc.lisp b/src/code/gc.lisp index dcab2ea..6daa745 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -17,24 +17,21 @@ sb!vm:*static-space-free-pointer*)) (eval-when (:compile-toplevel :execute) - (sb!xc:defmacro def-c-var-frob (lisp-fun c-var-name) - `(progn - #!-sb-fluid (declaim (inline ,lisp-fun)) - (defun ,lisp-fun () - (sb!alien:extern-alien ,c-var-name (sb!alien:unsigned 32)))))) + (sb!xc:defmacro def-c-var-fun (lisp-fun c-var-name) + `(defun ,lisp-fun () + (sb!alien:extern-alien ,c-var-name (sb!alien:unsigned 32))))) +#!-sb-fluid +(declaim (inline current-dynamic-space-start)) +#!+gencgc +(defun current-dynamic-space-spart () sb!vm:dynamic-space-start) #!-gencgc -(progn - ;; This is called once per PROFILEd function call, so it's worth a - ;; little possible space cost to reduce its time cost. - #!-sb-fluid - (declaim (inline current-dynamic-space-start)) - (def-c-var-frob current-dynamic-space-start "current_dynamic_space")) +(def-c-var-fun current-dynamic-space-start "current_dynamic_space") #!-sb-fluid -(declaim (inline dynamic-usage)) ; to reduce PROFILEd call overhead +(declaim (inline dynamic-usage)) #!+gencgc -(def-c-var-frob dynamic-usage "bytes_allocated") +(def-c-var-fun dynamic-usage "bytes_allocated") #!-gencgc (defun dynamic-usage () (the (unsigned-byte 32) diff --git a/src/code/room.lisp b/src/code/room.lisp index 3dc375e..1116735 100644 --- a/src/code/room.lisp +++ b/src/code/room.lisp @@ -171,8 +171,7 @@ (values (int-sap read-only-space-start) (int-sap (* *read-only-space-free-pointer* n-word-bytes)))) (:dynamic - (values (int-sap #!+gencgc dynamic-space-start - #!-gencgc (current-dynamic-space-start)) + (values (int-sap (current-dynamic-space-start)) (dynamic-space-free-pointer))))) ;;; Return the total number of bytes used in SPACE. diff --git a/src/compiler/alpha/parms.lisp b/src/compiler/alpha/parms.lisp index 9fbee3c..8d3ce22 100644 --- a/src/compiler/alpha/parms.lisp +++ b/src/compiler/alpha/parms.lisp @@ -122,12 +122,6 @@ (def!constant static-space-start #x28000000) (def!constant static-space-end #x2c000000) -;; this is used in PURIFY as part of a sloppy check to see if a pointer -;; is in dynamic space. Chocolate brownie for the first person to fix it -;; -dan 20010502 -(def!constant dynamic-space-start #x30000000) -(def!constant dynamic-space-end #x3fff0000) - (def!constant dynamic-0-space-start #x30000000) (def!constant dynamic-0-space-end #x3fff0000) diff --git a/src/compiler/hppa/parms.lisp b/src/compiler/hppa/parms.lisp index f53d7b4..8eb4fea 100644 --- a/src/compiler/hppa/parms.lisp +++ b/src/compiler/hppa/parms.lisp @@ -68,9 +68,6 @@ (def!constant static-space-start #x28000000) (def!constant static-space-end #x2a000000) -(def!constant dynamic-space-start #x30000000) -(def!constant dynamic-space-end #x37fff000) - (def!constant dynamic-0-space-start #x30000000) (def!constant dynamic-0-space-end #x37fff000) (def!constant dynamic-1-space-start #x38000000) diff --git a/src/compiler/mips/parms.lisp b/src/compiler/mips/parms.lisp index 375d413..05e35bc 100644 --- a/src/compiler/mips/parms.lisp +++ b/src/compiler/mips/parms.lisp @@ -65,9 +65,6 @@ (def!constant static-space-start #x06000000) (def!constant static-space-end #x08000000) -(def!constant dynamic-space-start #x08000000) -(def!constant dynamic-space-end #x0c000000) - (def!constant dynamic-0-space-start #x08000000) (def!constant dynamic-0-space-end #x0c000000) (def!constant dynamic-1-space-start #x0c000000) diff --git a/src/compiler/ppc/parms.lisp b/src/compiler/ppc/parms.lisp index 0ccbe21..c38f1d0 100644 --- a/src/compiler/ppc/parms.lisp +++ b/src/compiler/ppc/parms.lisp @@ -90,22 +90,16 @@ (def!constant static-space-start #x08000000) (def!constant static-space-end #x097fff00) -;;; FIXME: this is a gross violation of OAOO, done purely to support -;;; the #define of DYNAMIC_SPACE_SIZE in validate.c -- CSR, 2002-02-25 -;;; (these numbers should match dynamic-0-*) -(def!constant dynamic-space-start #x40000000) -(def!constant dynamic-space-end #x47fff000) - ;;; nothing _seems_ to be using these addresses -(def!constant dynamic-0-space-start #x40000000) -(def!constant dynamic-0-space-end #x47fff000) -(def!constant dynamic-1-space-start #x48000000) -(def!constant dynamic-1-space-end #x4ffff000) +(def!constant dynamic-0-space-start #x10000000) +(def!constant dynamic-0-space-end #x3ffff000) +(def!constant dynamic-1-space-start #x40000000) +(def!constant dynamic-1-space-end #x6ffff000) #!+darwin (progn - (def!constant linkage-table-space-start #x50000000) - (def!constant linkage-table-space-end #x51000000) + (def!constant linkage-table-space-start #x0a000000) + (def!constant linkage-table-space-end #x0b000000) (def!constant linkage-table-entry-size 16)) ;;;; Other miscellaneous constants. diff --git a/src/compiler/sparc/parms.lisp b/src/compiler/sparc/parms.lisp index a4821ee..faa9e0b 100644 --- a/src/compiler/sparc/parms.lisp +++ b/src/compiler/sparc/parms.lisp @@ -101,13 +101,6 @@ (def!constant static-space-start #x28000000) (def!constant static-space-end #x2c000000) - ;; From alpha/parms.lisp: - ;; this is used in PURIFY as part of a sloppy check to see if a pointer - ;; is in dynamic space. Chocolate brownie for the first person to fix it - ;; -dan 20010502 - (def!constant dynamic-space-start #x30000000) - (def!constant dynamic-space-end #x38000000) - (def!constant dynamic-0-space-start #x30000000) (def!constant dynamic-0-space-end #x38000000) @@ -125,9 +118,6 @@ (def!constant static-space-start #x28000000) (def!constant static-space-end #x2c000000) - (def!constant dynamic-space-start #x30000000) - (def!constant dynamic-space-end #x38000000) - (def!constant dynamic-0-space-start #x30000000) (def!constant dynamic-0-space-end #x38000000) diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index c1a0a24..5233c1d 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -192,8 +192,8 @@ is_valid_lisp_addr(os_vm_address_t addr) #if defined LISP_FEATURE_GENCGC || (DYNAMIC_SPACE_START <= ad && ad < DYNAMIC_SPACE_END) #else - || (DYNAMIC_0_SPACE_START <= ad && ad < DYNAMIC_SPACE_END) - || (DYNAMIC_1_SPACE_START <= ad && ad < DYNAMIC_SPACE_END) + || (DYNAMIC_0_SPACE_START <= ad && ad < DYNAMIC_0_SPACE_END) + || (DYNAMIC_1_SPACE_START <= ad && ad < DYNAMIC_1_SPACE_END) #endif ) return 1; diff --git a/src/runtime/validate.h b/src/runtime/validate.h index 478f321..d0a1a8c 100644 --- a/src/runtime/validate.h +++ b/src/runtime/validate.h @@ -12,13 +12,21 @@ #if !defined(_INCLUDE_VALIDATE_H_) #define _INCLUDE_VALIDATE_H_ -/* constants derived from the fundamental constants in passed by GENESIS */ -#define BINDING_STACK_SIZE (1024*1024) /* chosen at random */ -#define DYNAMIC_SPACE_SIZE ( DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) -#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START) -#define STATIC_SPACE_SIZE ( STATIC_SPACE_END - STATIC_SPACE_START) -#define THREAD_CONTROL_STACK_SIZE (2*1024*1024) /* eventually this'll be choosable per-thread */ +#ifndef LISP_FEATURE_GENCGC +#define DYNAMIC_SPACE_START current_dynamic_space +#endif + +#define BINDING_STACK_SIZE (1024*1024) /* chosen at random */ +#define THREAD_CONTROL_STACK_SIZE (2*1024*1024) /* eventually choosable per-thread */ +/* constants derived from the fundamental constants in passed by GENESIS */ +#ifdef LISP_FEATURE_GENCGC +#define DYNAMIC_SPACE_SIZE (DYNAMIC_SPACE_END - DYNAMIC_SPACE_START) +#else +#define DYNAMIC_SPACE_SIZE (DYNAMIC_0_SPACE_END - DYNAMIC_0_SPACE_START) +#endif +#define READ_ONLY_SPACE_SIZE (READ_ONLY_SPACE_END - READ_ONLY_SPACE_START) +#define STATIC_SPACE_SIZE (STATIC_SPACE_END - STATIC_SPACE_START) #ifdef LISP_FEATURE_LINKAGE_TABLE #define LINKAGE_TABLE_SPACE_SIZE (LINKAGE_TABLE_SPACE_END - LINKAGE_TABLE_SPACE_START) #endif diff --git a/version.lisp-expr b/version.lisp-expr index f8bcf07..e8449fc 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.1.4" +"0.9.1.5"