Top


定義場所(file name)

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

名前(function name)

void VM_GenCollectForAllocation::doit() {

本体部(body)

  {- -------------------------------------------
  (1) (DTrace のフック点) (JVMTI のフック点)
      (See: SvcGCMarker)
      ---------------------------------------- -}

      SvcGCMarker sgcm(SvcGCMarker::MINOR);

  {- -------------------------------------------
  (1) (変数宣言など)
      ---------------------------------------- -}

      GenCollectedHeap* gch = GenCollectedHeap::heap();
      GCCauseSetter gccs(gch, _gc_cause);

  {- -------------------------------------------
  (1) GenCollectedHeap::satisfy_failed_allocation() により, GC 処理を実行して, メモリ確保を試みる.
      ---------------------------------------- -}

      _res = gch->satisfy_failed_allocation(_size, _tlab);

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

      assert(gch->is_in_reserved_or_null(_res), "result not in heap");

  {- -------------------------------------------
  (1) もし GC_locker のせいで成功しなかった場合は, _gc_locked フィールドを true にしておく.
      (See: _gc_locked)
      ---------------------------------------- -}

      if (_res == NULL && GC_locker::is_active_and_needs_gc()) {
        set_gc_locked();
      }
    }

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