< prev index next >

src/share/vm/services/memoryPool.hpp

Print this page




  83   volatile instanceOop _memory_pool_obj;
  84 
  85   void add_manager(MemoryManager* mgr);
  86 
  87  public:
  88   MemoryPool(const char* name,
  89              PoolType type,
  90              size_t init_size,
  91              size_t max_size,
  92              bool support_usage_threshold,
  93              bool support_gc_threshold);
  94 
  95   const char* name()                       { return _name; }
  96   bool        is_heap()                    { return _type == Heap; }
  97   bool        is_non_heap()                { return _type == NonHeap; }
  98   size_t      initial_size()   const       { return _initial_size; }
  99   int         num_memory_managers() const  { return _num_managers; }
 100   // max size could be changed
 101   virtual size_t max_size()    const       { return _max_size; }
 102 
 103   bool is_pool(instanceHandle pool) { return (pool() == _memory_pool_obj); }
 104 
 105   bool available_for_allocation()   { return _available_for_allocation; }
 106   bool set_available_for_allocation(bool value) {
 107     bool prev = _available_for_allocation;
 108     _available_for_allocation = value;
 109     return prev;
 110   }
 111 
 112   MemoryManager* get_memory_manager(int index) {
 113     assert(index >= 0 && index < _num_managers, "Invalid index");
 114     return _managers[index];
 115   }
 116 
 117   // Records current memory usage if it's a peak usage
 118   void record_peak_memory_usage();
 119 
 120   MemoryUsage get_peak_memory_usage() {
 121     // check current memory usage first and then return peak usage
 122     record_peak_memory_usage();
 123     return _peak_usage;




  83   volatile instanceOop _memory_pool_obj;
  84 
  85   void add_manager(MemoryManager* mgr);
  86 
  87  public:
  88   MemoryPool(const char* name,
  89              PoolType type,
  90              size_t init_size,
  91              size_t max_size,
  92              bool support_usage_threshold,
  93              bool support_gc_threshold);
  94 
  95   const char* name()                       { return _name; }
  96   bool        is_heap()                    { return _type == Heap; }
  97   bool        is_non_heap()                { return _type == NonHeap; }
  98   size_t      initial_size()   const       { return _initial_size; }
  99   int         num_memory_managers() const  { return _num_managers; }
 100   // max size could be changed
 101   virtual size_t max_size()    const       { return _max_size; }
 102 
 103   bool is_pool(instanceHandle pool) { return pool() == _memory_pool_obj; }
 104 
 105   bool available_for_allocation()   { return _available_for_allocation; }
 106   bool set_available_for_allocation(bool value) {
 107     bool prev = _available_for_allocation;
 108     _available_for_allocation = value;
 109     return prev;
 110   }
 111 
 112   MemoryManager* get_memory_manager(int index) {
 113     assert(index >= 0 && index < _num_managers, "Invalid index");
 114     return _managers[index];
 115   }
 116 
 117   // Records current memory usage if it's a peak usage
 118   void record_peak_memory_usage();
 119 
 120   MemoryUsage get_peak_memory_usage() {
 121     // check current memory usage first and then return peak usage
 122     record_peak_memory_usage();
 123     return _peak_usage;


< prev index next >