src/hotspot/share/gc/g1/g1MemoryPool.cpp
changeset 51625 c265860d5d45
parent 51498 9a5200b84046
equal deleted inserted replaced
51624:7ed777a14094 51625:c265860d5d45
    46                     initial_size,
    46                     initial_size,
    47                     MemoryUsage::undefined_size(),
    47                     MemoryUsage::undefined_size(),
    48                     false /* support_usage_threshold */) { }
    48                     false /* support_usage_threshold */) { }
    49 
    49 
    50 MemoryUsage G1EdenPool::get_memory_usage() {
    50 MemoryUsage G1EdenPool::get_memory_usage() {
    51   size_t committed  = _g1mm->eden_space_committed();
    51   return _g1mm->eden_space_memory_usage(initial_size(), max_size());
    52 
       
    53   return MemoryUsage(initial_size(), used_in_bytes(), committed, max_size());
       
    54 }
    52 }
    55 
    53 
    56 G1SurvivorPool::G1SurvivorPool(G1CollectedHeap* g1h, size_t initial_size) :
    54 G1SurvivorPool::G1SurvivorPool(G1CollectedHeap* g1h, size_t initial_size) :
    57   G1MemoryPoolSuper(g1h,
    55   G1MemoryPoolSuper(g1h,
    58                     "G1 Survivor Space",
    56                     "G1 Survivor Space",
    59                     initial_size,
    57                     initial_size,
    60                     MemoryUsage::undefined_size(),
    58                     MemoryUsage::undefined_size(),
    61                     false /* support_usage_threshold */) { }
    59                     false /* support_usage_threshold */) { }
    62 
    60 
    63 MemoryUsage G1SurvivorPool::get_memory_usage() {
    61 MemoryUsage G1SurvivorPool::get_memory_usage() {
    64   size_t committed  = _g1mm->survivor_space_committed();
    62   return _g1mm->survivor_space_memory_usage(initial_size(), max_size());
    65 
       
    66   return MemoryUsage(initial_size(), used_in_bytes(), committed, max_size());
       
    67 }
    63 }
    68 
    64 
    69 G1OldGenPool::G1OldGenPool(G1CollectedHeap* g1h, size_t initial_size, size_t max_size) :
    65 G1OldGenPool::G1OldGenPool(G1CollectedHeap* g1h, size_t initial_size, size_t max_size) :
    70   G1MemoryPoolSuper(g1h,
    66   G1MemoryPoolSuper(g1h,
    71                     "G1 Old Gen",
    67                     "G1 Old Gen",
    72                     initial_size,
    68                     initial_size,
    73                     max_size,
    69                     max_size,
    74                     true /* support_usage_threshold */) { }
    70                     true /* support_usage_threshold */) { }
    75 
    71 
    76 MemoryUsage G1OldGenPool::get_memory_usage() {
    72 MemoryUsage G1OldGenPool::get_memory_usage() {
    77   size_t committed  = _g1mm->old_gen_committed();
    73   return _g1mm->old_gen_memory_usage(initial_size(), max_size());
    78 
       
    79   return MemoryUsage(initial_size(), used_in_bytes(), committed, max_size());
       
    80 }
    74 }