From 47fe7f5b227bba5964d5dd4d2a93d9e4b1d1502e Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Wed, 21 Aug 2013 16:52:26 +0400 Subject: [PATCH] Don't hardcode the number of gencgc generations. Use sb-vm:+pseudo-static-generation+. Patch by Andreas Franke. --- contrib/sb-introspect/test-driver.lisp | 3 ++- src/code/gc.lisp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/sb-introspect/test-driver.lisp b/contrib/sb-introspect/test-driver.lisp index e6bee2e..aa7bfc8 100644 --- a/contrib/sb-introspect/test-driver.lisp +++ b/contrib/sb-introspect/test-driver.lisp @@ -318,7 +318,8 @@ (tai #'cons :heap ;; FIXME: This is the canonical GENCGC result. On PPC we sometimes get ;; :LARGE T, which doesn't seem right -- but ignore that for now. - '(:space :dynamic :generation 6 :write-protected t :boxed t :pinned nil :large nil) + `(:space :dynamic :generation ,sb-vm:+pseudo-static-generation+ + :write-protected t :boxed t :pinned nil :large nil) :ignore (list :page #+ppc :large)) #-gencgc (tai :cons :heap diff --git a/src/code/gc.lisp b/src/code/gc.lisp index b0f5fbc..61c351c 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -329,7 +329,7 @@ which may in turn trigger a collection of one or more older generations as well. If FULL is true, all generations are collected. If GEN is provided, it can be used to specify the oldest generation guaranteed to be collected." - (when (sub-gc :gen (if full 6 gen)) + (when (sub-gc :gen (if full sb!vm:+pseudo-static-generation+ gen)) (post-gc))) (define-alien-routine scrub-control-stack sb!alien:void) -- 1.7.10.4