< prev index next >

src/share/vm/services/memoryPool.cpp

Print this page
rev 8362 : [mq]: hotspot


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "memory/defNewGeneration.hpp"

  29 #include "memory/metaspace.hpp"
  30 #include "memory/space.hpp"
  31 #include "oops/oop.inline.hpp"
  32 #include "runtime/handles.inline.hpp"
  33 #include "runtime/javaCalls.hpp"
  34 #include "runtime/orderAccess.inline.hpp"
  35 #include "services/lowMemoryDetector.hpp"
  36 #include "services/management.hpp"
  37 #include "services/memoryManager.hpp"
  38 #include "services/memoryPool.hpp"
  39 #include "utilities/globalDefinitions.hpp"
  40 #include "utilities/macros.hpp"
  41 #if INCLUDE_ALL_GCS
  42 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
  43 #endif
  44 
  45 MemoryPool::MemoryPool(const char* name,
  46                        PoolType type,
  47                        size_t init_size,
  48                        size_t max_size,
  49                        bool support_usage_threshold,
  50                        bool support_gc_threshold) {
  51   _name = name;
  52   _initial_size = init_size;
  53   _max_size = max_size;
  54   (void)const_cast<instanceOop&>(_memory_pool_obj = instanceOop(NULL));
  55   _available_for_allocation = true;
  56   _num_managers = 0;
  57   _type = type;
  58 
  59   // initialize the max and init size of collection usage
  60   _after_gc_usage = MemoryUsage(_initial_size, 0, 0, _max_size);
  61 
  62   _usage_sensor = NULL;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/systemDictionary.hpp"
  27 #include "classfile/vmSymbols.hpp"
  28 #include "gc/serial/defNewGeneration.hpp"
  29 #include "gc/shared/space.hpp"
  30 #include "memory/metaspace.hpp"

  31 #include "oops/oop.inline.hpp"
  32 #include "runtime/handles.inline.hpp"
  33 #include "runtime/javaCalls.hpp"
  34 #include "runtime/orderAccess.inline.hpp"
  35 #include "services/lowMemoryDetector.hpp"
  36 #include "services/management.hpp"
  37 #include "services/memoryManager.hpp"
  38 #include "services/memoryPool.hpp"
  39 #include "utilities/globalDefinitions.hpp"
  40 #include "utilities/macros.hpp"
  41 #if INCLUDE_ALL_GCS
  42 #include "gc/cms/compactibleFreeListSpace.hpp"
  43 #endif
  44 
  45 MemoryPool::MemoryPool(const char* name,
  46                        PoolType type,
  47                        size_t init_size,
  48                        size_t max_size,
  49                        bool support_usage_threshold,
  50                        bool support_gc_threshold) {
  51   _name = name;
  52   _initial_size = init_size;
  53   _max_size = max_size;
  54   (void)const_cast<instanceOop&>(_memory_pool_obj = instanceOop(NULL));
  55   _available_for_allocation = true;
  56   _num_managers = 0;
  57   _type = type;
  58 
  59   // initialize the max and init size of collection usage
  60   _after_gc_usage = MemoryUsage(_initial_size, 0, 0, _max_size);
  61 
  62   _usage_sensor = NULL;


< prev index next >