[rucksack-cvs] CVS rucksack

alemmens alemmens at common-lisp.net
Sat May 20 15:35:38 UTC 2006


Update of /project/rucksack/cvsroot/rucksack
In directory clnet:/tmp/cvs-serv11397/rucksack

Modified Files:
	garbage-collector.lisp rucksack.lisp 
Log Message:
Fix an obsolete comment.


--- /project/rucksack/cvsroot/rucksack/garbage-collector.lisp	2006/05/20 10:33:49	1.5
+++ /project/rucksack/cvsroot/rucksack/garbage-collector.lisp	2006/05/20 15:35:37	1.6
@@ -1,4 +1,4 @@
-;; $Id: garbage-collector.lisp,v 1.5 2006/05/20 10:33:49 alemmens Exp $
+;; $Id: garbage-collector.lisp,v 1.6 2006/05/20 15:35:37 alemmens Exp $
 
 (in-package :rucksack)
 
@@ -90,8 +90,7 @@
   ;; Write the block size (as a negative number) in the start of the
   ;; block (just behind the header) to indicate that this is a free
   ;; block.  This is necessary for the sweep phase of a mark-and-sweep
-  ;; collector to distinguish it from a block that contains an object
-  ;; (and starts with a non-negative object id).
+  ;; collector to distinguish it from a block that contains an object.
   (file-position (heap-stream heap) (+ block (block-header-size heap)))
   (serialize (- block-size) (heap-stream heap)))
 
@@ -109,7 +108,7 @@
   ;; In the scanning phase, the object id must be added to the root set to
   ;; guarantee that it will be marked and scanned.
   (when (eql (state heap) :scanning)
-    (push object-id (roots heap))))
+    (add-rucksack-root-id object-id (roots heap))))
 
 ;;
 ;; Hooking into free list methods
--- /project/rucksack/cvsroot/rucksack/rucksack.lisp	2006/05/18 12:46:57	1.3
+++ /project/rucksack/cvsroot/rucksack/rucksack.lisp	2006/05/20 15:35:37	1.4
@@ -1,4 +1,4 @@
-;; $Id: rucksack.lisp,v 1.3 2006/05/18 12:46:57 alemmens Exp $
+;; $Id: rucksack.lisp,v 1.4 2006/05/20 15:35:37 alemmens Exp $
 
 (in-package :rucksack)
 
@@ -273,7 +273,10 @@
 
   
 (defmethod add-rucksack-root (object (rucksack standard-rucksack))
-  (push (object-id object) (slot-value rucksack 'roots))
+  (add-rucksack-root-id (object-id object) rucksack))
+
+(defun add-rucksack-root-id (object-id rucksack)
+  (push object-id (slot-value rucksack 'roots))
   (setf (roots-changed-p rucksack) t))
 
 (defmethod map-rucksack-roots (function (rucksack standard-rucksack))




More information about the rucksack-cvs mailing list