hotspot/src/share/vm/services/memoryManager.cpp
changeset 24831 e4df2f64bb2e
parent 24351 61b33cc6d3cf
child 27880 afb974a04396
equal deleted inserted replaced
24830:2fbbde433861 24831:e4df2f64bb2e
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    37 #include "services/gcNotifier.hpp"
    37 #include "services/gcNotifier.hpp"
    38 #include "utilities/dtrace.hpp"
    38 #include "utilities/dtrace.hpp"
    39 
    39 
    40 MemoryManager::MemoryManager() {
    40 MemoryManager::MemoryManager() {
    41   _num_pools = 0;
    41   _num_pools = 0;
    42   (void)const_cast<instanceOop&>(_memory_mgr_obj = NULL);
    42   (void)const_cast<instanceOop&>(_memory_mgr_obj = instanceOop(NULL));
    43 }
    43 }
    44 
    44 
    45 void MemoryManager::add_pool(MemoryPool* pool) {
    45 void MemoryManager::add_pool(MemoryPool* pool) {
    46   assert(_num_pools < MemoryManager::max_num_pools, "_num_pools exceeds the max");
    46   assert(_num_pools < MemoryManager::max_num_pools, "_num_pools exceeds the max");
    47   if (_num_pools < MemoryManager::max_num_pools) {
    47   if (_num_pools < MemoryManager::max_num_pools) {