default gen.bytes_consed_between_gc to same 5% of dynamic space size
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 19 Nov 2011 14:35:18 +0000 (16:35 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 19 Nov 2011 15:04:37 +0000 (17:04 +0200)
  ...the previous default was 2,000,000 bytes, not 20Mb as the
  documentation claimed. Oops.

NEWS
src/code/gc.lisp
src/runtime/gencgc.c
tests/gc.impure.lisp

diff --git a/NEWS b/NEWS
index 8040ec6..f86d780 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,8 +24,8 @@ changes relative to sbcl-1.0.53:
        STANDARD-INSTANCE-ACCESS, and FUNCALLABLE-STANDARD-INSTANCE-ACCESS.
     ** Users can now defined new places usable with SB-EXT:COMPARE-AND-SWAP
        using an API anologous to defining new SETFable places.
-  * enhancement: on GENCGC systems nursery size now defaults to 5% of
-    dynamic-space size.
+  * enhancement: on GENCGC systems nursery and generation sizes now default to
+    5% of dynamic-space size.
   * enhancement: on CHENEYGC targets, SB-KERNEL:MAKE-LISP-OBJ now does
     the same validation of pointer objects as GENCGC does, instead of a
     comparatively weak bounds-check against the heap spaces.
index 44b3ac5..2d2dc84 100644 (file)
@@ -419,7 +419,8 @@ Note: currently changes to this value are lost when saving core."
       "Number of bytes that can be allocated to GENERATION before that
 generation is considered for garbage collection. This value is meaningless for
 generation 0 (the nursery): see BYTES-CONSED-BETWEEN-GCS instead. Default is
-20Mb. Can be assigned to using SETF. Available on GENCGC platforms only.
+5% of the dynamic space size. Can be assigned to using SETF. Available on
+GENCGC platforms only.
 
 Experimental: interface subject to change."
     t)
index 87f20a4..12fecd6 100644 (file)
@@ -4136,7 +4136,7 @@ gc_init(void)
         generations[i].num_gc = 0;
         generations[i].cum_sum_bytes_allocated = 0;
         /* the tune-able parameters */
-        generations[i].bytes_consed_between_gc = 2000000;
+        generations[i].bytes_consed_between_gc = bytes_consed_between_gcs;
         generations[i].number_of_gcs_before_promotion = 1;
         generations[i].minimum_age_before_gc = 0.75;
     }
index a5e9bfb..faf5693 100644 (file)
 
 ;;; SB-EXT:GENERATION-* accessors returned bogus values for generation > 0
 (with-test (:name :bug-529014 :skipped-on '(not :gencgc))
-  ;; FIXME: These parameters are a) tunable in the source and b)
-  ;; duplicated multiple times there and now here.  It would be good to
-  ;; OAOO-ify them (probably to src/compiler/generic/params.lisp).
   (loop for i from 0 to sb-vm:+pseudo-static-generation+
-     do (assert (= (sb-ext:generation-bytes-consed-between-gcs i) 2000000))
-       (assert (= (sb-ext:generation-minimum-age-before-gc i) 0.75))
-       (assert (= (sb-ext:generation-number-of-gcs-before-promotion i) 1))))
+     do (assert (= (sb-ext:generation-bytes-consed-between-gcs i)
+                   (sb-ext:bytes-consed-between-gcs)))
+        ;; FIXME: These parameters are a) tunable in the source and b)
+        ;; duplicated multiple times there and now here.  It would be good to
+        ;; OAOO-ify them (probably to src/compiler/generic/params.lisp).
+        (assert (= (sb-ext:generation-minimum-age-before-gc i) 0.75))
+        (assert (= (sb-ext:generation-number-of-gcs-before-promotion i) 1))))