Top


定義場所(file name)

hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp

名前(function name)

void PtrQueue::enqueue_known_active(void* ptr) {

本体部(body)

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(0 <= _index && _index <= _sz, "Invariant.");
      assert(_index == 0 || _buf != NULL, "invariant");

  {- -------------------------------------------
  (1) PtrQueue::handle_zero_index() を呼んで, PtrQueue の確保を行う.
      (この呼び出しは, 確保に成功するまで繰り返す)
      ---------------------------------------- -}

      while (_index == 0) {
        handle_zero_index();
      }

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(_index > 0, "postcondition");

  {- -------------------------------------------
  (1) ptr 引数で指定された要素を _buf の先頭に追加する
      (ついでに _index も 1要素分だけデクリメントする).
      ---------------------------------------- -}

      _index -= oopSize;
      _buf[byte_index_to_index((int)_index)] = ptr;

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(0 <= _index && _index <= _sz, "Invariant.");
    }

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