X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fgc.lisp;h=b477d981c36b5e18ffefacfaca9ad6b5e7f18a7a;hb=aa01df7a18a5d8747423173bda7c20eb46092514;hp=6dbc4f83090e62eb5bce3c8455163ec6ed14f9ed;hpb=bc24f7bd29de45f66e4aa08cfc3219548cfef177;p=sbcl.git diff --git a/src/code/gc.lisp b/src/code/gc.lisp index 6dbc4f8..b477d98 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -304,13 +304,28 @@ statistics are appended to it." (call-hooks "after-GC" *after-gc-hooks* :on-error :warn)))))) ;;; This is the user-advertised garbage collection function. -(defun gc (&key (gen 0) (full nil) &allow-other-keys) +(defun gc (&key (full nil) (gen 0) &allow-other-keys) #!+(and sb-doc gencgc) - "Initiate a garbage collection. GEN controls the number of generations - to garbage collect." + "Initiate a garbage collection. + +The default is to initiate a nursery collection, 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. + +On CheneyGC platforms arguments FULL and GEN take no effect: a full +collection is always preformed." #!+(and sb-doc (not gencgc)) - "Initiate a garbage collection. GEN may be provided for compatibility with - generational garbage collectors, but is ignored in this implementation." + "Initiate a garbage collection. + +The collection is always a full collection. + +Arguments FULL and GEN can be used for compatibility with GENCGC +platforms: there the default is to initiate a nursery collection, +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)) (post-gc)))