hotspot/src/share/vm/services/memoryPool.hpp
changeset 16453 6009860b0b1e
parent 16451 2f68393e1bef
child 18444 8adb4bc92f18
equal deleted inserted replaced
16452:59d6b3ae04f0 16453:6009860b0b1e
    26 #define SHARE_VM_SERVICES_MEMORYPOOL_HPP
    26 #define SHARE_VM_SERVICES_MEMORYPOOL_HPP
    27 
    27 
    28 #include "gc_implementation/shared/mutableSpace.hpp"
    28 #include "gc_implementation/shared/mutableSpace.hpp"
    29 #include "memory/defNewGeneration.hpp"
    29 #include "memory/defNewGeneration.hpp"
    30 #include "memory/heap.hpp"
    30 #include "memory/heap.hpp"
    31 #include "memory/metaspace.hpp"
       
    32 #include "memory/space.hpp"
    31 #include "memory/space.hpp"
    33 #include "services/memoryUsage.hpp"
    32 #include "services/memoryUsage.hpp"
    34 #include "utilities/macros.hpp"
    33 #include "utilities/macros.hpp"
    35 #if INCLUDE_ALL_GCS
    34 #if INCLUDE_ALL_GCS
    36 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
    35 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
   221   CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_usage_threshold);
   220   CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_usage_threshold);
   222   MemoryUsage get_memory_usage();
   221   MemoryUsage get_memory_usage();
   223   size_t used_in_bytes()            { return _codeHeap->allocated_capacity(); }
   222   size_t used_in_bytes()            { return _codeHeap->allocated_capacity(); }
   224 };
   223 };
   225 
   224 
   226 class MetaspacePoolBase : public MemoryPool {
       
   227 private:
       
   228   Metaspace::MetadataType _md_type;
       
   229 protected:
       
   230   static const size_t _undefined_max_size = (size_t) -1;
       
   231 public:
       
   232   MetaspacePoolBase(const char *name, Metaspace::MetadataType md_type, size_t max_size);
       
   233   MemoryUsage get_memory_usage();
       
   234   size_t used_in_bytes();
       
   235 };
       
   236 
       
   237 class ClassMetaspacePool : public MetaspacePoolBase {
       
   238 private:
       
   239   size_t calculate_max_size();
       
   240 public:
       
   241   ClassMetaspacePool();
       
   242 };
       
   243 
       
   244 class MetaspacePool : public MetaspacePoolBase {
       
   245 private:
       
   246   size_t calculate_max_size();
       
   247 public:
       
   248   MetaspacePool();
       
   249 };
       
   250 
       
   251 #endif // SHARE_VM_SERVICES_MEMORYPOOL_HPP
   225 #endif // SHARE_VM_SERVICES_MEMORYPOOL_HPP