Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp

説明(description)

// We preserve the mark which should be replaced at the end and the location
// that it will go.  Note that the object that this markOop belongs to isn't
// currently at that address but it will be after phase4

名前(function name)

void MarkSweep::preserve_mark(oop obj, markOop mark) {

本体部(body)

  {- -------------------------------------------
  (1) 引数で与えられた oop とその mark を記録しておく.
      * もし _preserved_marks に未だ空きがあれば, PreservedMark::init() で _preserved_marks に格納する.
      * 空きがなければ, _preserved_mark_stack と _preserved_oop_stack に格納しておく.
      (See: PreservedMark)
      ---------------------------------------- -}

      // We try to store preserved marks in the to space of the new generation since
      // this is storage which should be available.  Most of the time this should be
      // sufficient space for the marks we need to preserve but if it isn't we fall
      // back to using Stacks to keep track of the overflow.
      if (_preserved_count < _preserved_count_max) {
        _preserved_marks[_preserved_count++].init(obj, mark);
      } else {
        _preserved_mark_stack.push(mark);
        _preserved_oop_stack.push(obj);
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.