anchor.diff:      ;; Rebuild freelists.
       (rebuild-freelist *wired-area-free-bins* :wired *wired-area-base* *wired-area-bump*)
       (rebuild-freelist *pinned-area-free-bins* :pinned *pinned-area-base* *pinned-area-bump*)
  +    ;; Make sure wired, pinned, gen1, gen2 don't contain gen0 pointers.
  +    (verify-range *wired-area-base*
  +                  (- *wired-area-bump* *wired-area-base*)
  +                  +address-generation-1+)
  +    (verify-range *pinned-area-base*
  +                  (- *pinned-area-bump* *pinned-area-base*)
  +                  +address-generation-1+)
  +    (verify-range (logior (ash +address-tag-general+ +address-tag-shift+)
  +                          *dynamic-mark-bit*)
  +                  *general-area-bump*
  +                  +address-generation-1+)
  +    (verify-cons-range (logior (ash +address-tag-cons+ +address-tag-shift+)
  +                               *dynamic-mark-bit*)
  +                       *cons-area-bump*
  +                       +address-generation-1+)
  +    ;; Reset the pinned area's dirty bits
  +    (loop
  +       for i from *pinned-area-base* below *pinned-area-bump* by +card-size+
  +       do (setf (card-table-dirty-p i) nil))
  +    (mezzano.supervisor:protect-memory-range *pinned-area-base*
  +                                             (- *pinned-area-bump* *pinned-area-base*)
  +                                             (logior +block-map-present+
  +                                                     +block-map-writable+
  +                                                     +block-map-track-dirty+))
       (setf *gc-last-general-address* (logior (ash +address-tag-general+ +address-tag-shift+)
                                               *general-area-bump*
                                               *dynamic-mark-bit*)
  
positive.code:             (scan-object object :minor)
              (incf *scavenge-cons-finger* 16))))
      ;; Collection complete.
      ;; Trim gen1 down to the bump pointer and tag it for dirty tracking.
      (let ((new-limit (align-up *general-area-gen1-bump* +allocation-minimum-alignment+)))
        (mezzano.supervisor:protect-memory-range (logior (dpb +address-generation-1+ +address-generation+ 0)
  
negative.code:                                                                  +block-map-writable+
                                                                   +block-map-zero-fill+)))
        (mezzano.supervisor:panic "Insufficient space for garbage collection!"))
      ;; Disable dirty bit tracking on gen1.
      (mezzano.supervisor:protect-memory-range (logior (dpb +address-generation-1+ +address-generation+ 0)
                                                       (ash +address-tag-general+ +address-tag-shift+))
                                               *general-area-gen1-limit*
                                               (logior +block-map-present+
                                                       +block-map-writable+))
      (mezzano.supervisor:protect-memory-range (logior (dpb +address-generation-1+ +address-generation+ 0)
                                                       (ash +address-tag-cons+ +address-tag-shift+))
                                               *cons-area-gen1-limit*
                                               (logior +block-map-present+
                                                       +block-map-writable+))
      ;; Scan roots.
      ;; All thread stacks.
      (loop
         for thread = mezzano.supervisor::*all-threads* then (mezzano.supervisor::thread-global-next thread)
         until (null thread)
         do (minor-scan-thread thread))
      ;; The remembered set.
      ;; Wired area is scanned unconditionally, dirty bit tracking is not supported.
      (minor-scan-wired-range *wired-area-base* (- *wired-area-bump* *wired-area-base*))
      (minor-scan-range *pinned-area-base* (- *pinned-area-bump* *pinned-area-base*))
      (minor-scan-range (logior (ash +address-tag-general+ +address-tag-shift+)
                                *dynamic-mark-bit*)
  