Source
(defmethod sweep-some-object-blocks ((heap mark-and-sweep-heap)
(amount integer))
(let* ((object-table (object-table heap))
(object-block-size (min-block-size object-table))
(current-id (floor (nr-object-bytes-sweeped heap)
object-block-size))
(work-done 0))
(loop for object-id from current-id
while (and (< work-done amount)
(< object-id (object-table-size object-table)))
do (progn
(when (eql (object-info object-table object-id) :dead-object)
(delete-object-id object-table object-id)
(cache-delete-object object-id (rucksack-cache (rucksack heap))))
(incf (nr-object-bytes-sweeped heap) object-block-size)))
(when (>= (nr-object-bytes-sweeped heap) (nr-object-bytes heap))
(setf (state heap) :finishing))
work-done))
Source Context