A list of object-ids of roots that must be kept alive.
A flag to prevent recursive calls to COLLECT-SOME-GARBAGE.
(defclass garbage-collector ()
((object-table :initarg :object-table :reader object-table)
(buffer :initform (make-instance 'serialization-buffer)
:reader serialization-buffer)
(rucksack :initarg :rucksack :reader rucksack)
;; Some state used for incremental garbage collection.
(roots :initarg :roots :initform '() :accessor roots
:documentation "A list of object-ids of roots that must be kept alive.")
(state :initform :ready
:type (member :starting
:finishing
:ready
;; For copying collector
:copying
;; For mark-and-sweep collector
:marking-object-table
:scanning
:sweeping-heap
:sweeping-object-table)
:accessor state)
(doing-work :initform nil :accessor gc-doing-work
;; NOTE: This flag is probably not necessary anymore and
;; should probably be removed.
:documentation
"A flag to prevent recursive calls to COLLECT-SOME-GARBAGE.")))
Source Context