Top


定義場所(file name)

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

名前(function name)

void CollectorPolicy::initialize_flags() {

本体部(body)

  {- -------------------------------------------
  (1) ヒープサイズに関する各種コマンドラインオプションの値を調整する  (#TODO)
      ---------------------------------------- -}

      if (PermSize > MaxPermSize) {
        MaxPermSize = PermSize;
      }
      PermSize = MAX2(min_alignment(), align_size_down_(PermSize, min_alignment()));
      // Don't increase Perm size limit above specified.
      MaxPermSize = align_size_down(MaxPermSize, max_alignment());
      if (PermSize > MaxPermSize) {
        PermSize = MaxPermSize;
      }

      MinPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MinPermHeapExpansion, min_alignment()));
      MaxPermHeapExpansion = MAX2(min_alignment(), align_size_down_(MaxPermHeapExpansion, min_alignment()));

      MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, min_alignment());

      SharedReadOnlySize = align_size_up(SharedReadOnlySize, max_alignment());
      SharedReadWriteSize = align_size_up(SharedReadWriteSize, max_alignment());
      SharedMiscDataSize = align_size_up(SharedMiscDataSize, max_alignment());

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

      assert(PermSize    % min_alignment() == 0, "permanent space alignment");
      assert(MaxPermSize % max_alignment() == 0, "maximum permanent space alignment");
      assert(SharedReadOnlySize % max_alignment() == 0, "read-only space alignment");
      assert(SharedReadWriteSize % max_alignment() == 0, "read-write space alignment");
      assert(SharedMiscDataSize % max_alignment() == 0, "misc-data space alignment");

  {- -------------------------------------------
  (1) PermSize の値が 1MB 以下であれば, 
      (小さすぎるので) vm_exit_during_initialization() を呼んで異常終了させる.
      ---------------------------------------- -}

      if (PermSize < M) {
        vm_exit_during_initialization("Too small initial permanent heap");
      }
    }

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