X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fgc.lisp;h=866565d6778e322e1e21af8591b757700828eec6;hb=28d9bb7a509695caaf78d647b6aa1b0f02c0e83a;hp=f5cbc27abca03a221fc8c646fc99f41b136145ef;hpb=1bfc464c657a8f4ad24ef612f76a38d8f6f1bbad;p=sbcl.git diff --git a/src/code/gc.lisp b/src/code/gc.lisp index f5cbc27..866565d 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -140,7 +140,14 @@ and submit it as a patch." ;;; ;;; Unlike CMU CL, we don't export this variable. (There's no need to, ;;; since our BYTES-CONSED-BETWEEN-GCS function is SETFable.) -(defvar *bytes-consed-between-gcs* (* 4 (expt 10 6))) +(defvar *bytes-consed-between-gcs* + #+gencgc (* 4 (expt 10 6)) + ;; Stop-and-copy GC is really really slow when used too often. CSR + ;; reported that even on his old 64 Mb SPARC, 20 Mb is much faster + ;; than 4 Mb when rebuilding SBCL ca. 0.7.1. For modern machines + ;; with >> 128 Mb memory, the optimum could be significantly more + ;; than this, but at least 20 Mb should be better than 4 Mb. + #-gencgc (* 20 (expt 10 6))) (declaim (type index *bytes-consed-between-gcs*)) ;;;; GC hooks @@ -239,13 +246,13 @@ function should notify the user that the system has finished GC'ing.") ;;;; internal GC -(sb!alien:def-alien-routine collect-garbage sb!c-call:int - #!+gencgc (last-gen sb!c-call:int)) +(sb!alien:define-alien-routine collect-garbage sb!alien:int + #!+gencgc (last-gen sb!alien:int)) -(sb!alien:def-alien-routine set-auto-gc-trigger sb!c-call:void - (dynamic-usage sb!c-call:unsigned-long)) +(sb!alien:define-alien-routine set-auto-gc-trigger sb!alien:void + (dynamic-usage sb!alien:unsigned-long)) -(sb!alien:def-alien-routine clear-auto-gc-trigger sb!c-call:void) +(sb!alien:define-alien-routine clear-auto-gc-trigger sb!alien:void) ;;; This variable contains the function that does the real GC. This is ;;; for low-level GC experimentation. Do not touch it if you do not