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

Commits:

1 changed file:

Changes:

  • src/code/gc.lisp
    ... ... @@ -83,6 +83,13 @@
    83 83
       (alien:def-alien-variable ("pre_verify_gen_0" gc-verify-new-objects) c-call:int)
    
    84 84
       (alien:def-alien-variable ("verify_gens" gc-verify-generations) c-call:int)
    
    85 85
       (defun get-gc-assertions ()
    
    86
    +    "Returns a list of the current GC assertion settings. The list is
    
    87
    +    in the same format as the keyword arguments to SET-GC-ASSERTIONS,
    
    88
    +    i.e.,
    
    89
    +
    
    90
    +      (apply #'set-gc-assertions (get-gc-assertions))
    
    91
    +
    
    92
    +   See SET-GC-ASSERTIONS for more information."
    
    86 93
         (list :assert-level gc-assert-level
    
    87 94
     	  :verify-after-free-heap (not (zerop gc-verify-after-free-heap))
    
    88 95
     	  :verify-generations gc-verify-generations
    
    ... ... @@ -91,6 +98,23 @@
    91 98
     			      (verify-after-free-heap nil verify-after-free-heap-p)
    
    92 99
     			      (verify-generations 6 verify-generations-p)
    
    93 100
     			      (verify-new-objects nil verify-new-objects-p))
    
    101
    +    "Set GC assertion to the specified value:
    
    102
    +       :ASSERT-LEVEL-
    
    103
    +           Defaults to 0, higher values indicate more assertions are enabled.
    
    104
    +
    
    105
    +       :VERIFY-AFTER-FREE-HEAP
    
    106
    +           If non-NIL, the heap is verified for consistency whenever
    
    107
    +           part of the heap is collected.
    
    108
    +
    
    109
    +       :VERIFY-GENERATIONS
    
    110
    +           Set to generation number.  When GC occurs, generations
    
    111
    +           equal to or higher than this value are checked for
    
    112
    +           consistency.
    
    113
    +
    
    114
    +       :VERIFY-NEW-OBJECTS
    
    115
    +           When GC occurs for the newest generation, the heap for this
    
    116
    +           generation is checked for validity.
    
    117
    +"
    
    94 118
         (declare (type (and fixnum unsigned-byte) assert-level)
    
    95 119
     	     (type boolean verify-after-free-heap)
    
    96 120
     	     (type (integer 0 6) verify-generation)