hotspot/src/share/vm/services/memoryPool.cpp
changeset 32623 390a27af5657
parent 30764 fec48bf5a827
child 46329 53ccc37bda19
equal deleted inserted replaced
32622:7ed47d0b888a 32623:390a27af5657
   202   size_t committed = _space->capacity();
   202   size_t committed = _space->capacity();
   203 
   203 
   204   return MemoryUsage(initial_size(), used, committed, maxSize);
   204   return MemoryUsage(initial_size(), used, committed, maxSize);
   205 }
   205 }
   206 
   206 
   207 SurvivorContiguousSpacePool::SurvivorContiguousSpacePool(DefNewGeneration* gen,
   207 SurvivorContiguousSpacePool::SurvivorContiguousSpacePool(DefNewGeneration* young_gen,
   208                                                          const char* name,
   208                                                          const char* name,
   209                                                          PoolType type,
   209                                                          PoolType type,
   210                                                          size_t max_size,
   210                                                          size_t max_size,
   211                                                          bool support_usage_threshold) :
   211                                                          bool support_usage_threshold) :
   212   CollectedMemoryPool(name, type, gen->from()->capacity(), max_size,
   212   CollectedMemoryPool(name, type, young_gen->from()->capacity(), max_size,
   213                       support_usage_threshold), _gen(gen) {
   213                       support_usage_threshold), _young_gen(young_gen) {
   214 }
   214 }
   215 
   215 
   216 size_t SurvivorContiguousSpacePool::used_in_bytes() {
   216 size_t SurvivorContiguousSpacePool::used_in_bytes() {
   217   return _gen->from()->used();
   217   return _young_gen->from()->used();
   218 }
   218 }
   219 
   219 
   220 size_t SurvivorContiguousSpacePool::committed_in_bytes() {
   220 size_t SurvivorContiguousSpacePool::committed_in_bytes() {
   221   return _gen->from()->capacity();
   221   return _young_gen->from()->capacity();
   222 }
   222 }
   223 
   223 
   224 MemoryUsage SurvivorContiguousSpacePool::get_memory_usage() {
   224 MemoryUsage SurvivorContiguousSpacePool::get_memory_usage() {
   225   size_t maxSize = (available_for_allocation() ? max_size() : 0);
   225   size_t maxSize = (available_for_allocation() ? max_size() : 0);
   226   size_t used    = used_in_bytes();
   226   size_t used    = used_in_bytes();