[Git][cmucl/cmucl][issue-69-compile-in-gc-assert] Add docstrings for the GC assertion functions

Raymond Toy rtoy at common-lisp.net
Sat Sep 15 21:08:49 UTC 2018


Raymond Toy pushed to branch issue-69-compile-in-gc-assert at cmucl / cmucl


Commits:
ebc4d6ec by Raymond Toy at 2018-09-15T21:08:34Z
Add docstrings for the GC assertion functions

- - - - -


1 changed file:

- src/code/gc.lisp


Changes:

=====================================
src/code/gc.lisp
=====================================
@@ -83,6 +83,13 @@
   (alien:def-alien-variable ("pre_verify_gen_0" gc-verify-new-objects) c-call:int)
   (alien:def-alien-variable ("verify_gens" gc-verify-generations) c-call:int)
   (defun get-gc-assertions ()
+    "Returns a list of the current GC assertion settings. The list is
+    in the same format as the keyword arguments to SET-GC-ASSERTIONS,
+    i.e.,
+
+      (apply #'set-gc-assertions (get-gc-assertions))
+
+   See SET-GC-ASSERTIONS for more information."
     (list :assert-level gc-assert-level
 	  :verify-after-free-heap (not (zerop gc-verify-after-free-heap))
 	  :verify-generations gc-verify-generations
@@ -91,6 +98,23 @@
 			      (verify-after-free-heap nil verify-after-free-heap-p)
 			      (verify-generations 6 verify-generations-p)
 			      (verify-new-objects nil verify-new-objects-p))
+    "Set GC assertion to the specified value:
+       :ASSERT-LEVEL-
+           Defaults to 0, higher values indicate more assertions are enabled.
+
+       :VERIFY-AFTER-FREE-HEAP
+           If non-NIL, the heap is verified for consistency whenever
+           part of the heap is collected.
+
+       :VERIFY-GENERATIONS
+           Set to generation number.  When GC occurs, generations
+           equal to or higher than this value are checked for
+           consistency.
+
+       :VERIFY-NEW-OBJECTS
+           When GC occurs for the newest generation, the heap for this
+           generation is checked for validity.
+"
     (declare (type (and fixnum unsigned-byte) assert-level)
 	     (type boolean verify-after-free-heap)
 	     (type (integer 0 6) verify-generation)



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/ebc4d6ece03c716ae01bf05d78ac95fab964bf3c

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/ebc4d6ece03c716ae01bf05d78ac95fab964bf3c
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20180915/04ab0d1c/attachment-0001.html>


More information about the cmucl-cvs mailing list