Top


定義場所(file name)

hotspot/src/share/vm/memory/tenuredGeneration.cpp

名前(function name)

TenuredGeneration::TenuredGeneration(ReservedSpace rs,
                                     size_t initial_byte_size, int level,
                                     GenRemSet* remset) :

本体部(body)

  {- -------------------------------------------
  (1) スーパークラスの初期化
      ---------------------------------------- -}

      OneContigSpaceCardGeneration(rs, initial_byte_size,
                                   MinHeapDeltaBytes, level, remset, NULL)
    {

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

      HeapWord* bottom = (HeapWord*) _virtual_space.low();
      HeapWord* end    = (HeapWord*) _virtual_space.high();

  {- -------------------------------------------
  (1) フィールドの初期化
      ---------------------------------------- -}

      _the_space  = new TenuredSpace(_bts, MemRegion(bottom, end));
      _the_space->reset_saved_mark();
      _shrink_factor = 0;
      _capacity_at_prologue = 0;

      _gc_stats = new GCStats();

      // initialize performance counters

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

      const char* gen_name = "old";

  {- -------------------------------------------
  (1) フィールドの初期化
      ---------------------------------------- -}

      // Generation Counters -- generation 1, 1 subspace
      _gen_counters = new GenerationCounters(gen_name, 1, 1, &_virtual_space);

      _gc_counters = new CollectorCounters("MSC", 1);

      _space_counters = new CSpaceCounters(gen_name, 0,
                                           _virtual_space.reserved_size(),
                                           _the_space, _gen_counters);
    #ifndef SERIALGC
      if (UseParNewGC && ParallelGCThreads > 0) {
        typedef ParGCAllocBufferWithBOT* ParGCAllocBufferWithBOTPtr;
        _alloc_buffers = NEW_C_HEAP_ARRAY(ParGCAllocBufferWithBOTPtr,
                                          ParallelGCThreads);
        if (_alloc_buffers == NULL)
          vm_exit_during_initialization("Could not allocate alloc_buffers");
        for (uint i = 0; i < ParallelGCThreads; i++) {
          _alloc_buffers[i] =
            new ParGCAllocBufferWithBOT(OldPLABSize, _bts);
          if (_alloc_buffers[i] == NULL)
            vm_exit_during_initialization("Could not allocate alloc_buffers");
        }
      } else {
        _alloc_buffers = NULL;
      }
    #endif // SERIALGC
    }

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