/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
#include "services/lowMemoryDetector.hpp"
#include "services/management.hpp"
#include "services/memoryManager.hpp"
#include "services/memoryPool.hpp"
bool support_usage_threshold,
bool support_gc_threshold) {
_available_for_allocation = true;
_num_managers = 0;
// initialize the max and init size of collection usage
// usage threshold supports both high and low threshold
// gc usage threshold supports only high threshold
}
}
}
// Returns an instanceHandle of a MemoryPool object.
// It creates a MemoryPool instance when the first time
// this function is called.
// Must do an acquire so as to force ordering of subsequent
// loads from anything _memory_pool_obj points to or implies.
// It's ok for more than one thread to execute the code up to the locked region.
// Extra pool instances will just be gc'ed.
ik,
&args,
{
// Get lock since another thread may have create the instance
// Check if another thread has created the pool. We reload
// _memory_pool_obj here because some other thread may have
// initialized it while we were executing the code before the lock.
//
// The lock has done an acquire, so the load can't float above it,
// but we need to do a load_acquire as above.
return pool_obj;
}
// Get the address of the object we created via call_special.
// Use store barrier to make sure the memory accesses associated
// with creating the pool are visible before publishing its address.
// The unlock will publish the store to _memory_pool_obj because
// it does a release first.
}
}
return pool_obj;
}
}
void MemoryPool::record_peak_memory_usage() {
// Caller in JDK is responsible for synchronization -
// acquire the lock for this memory pool before calling VM
}
*sensor_ptr = sensor;
}
}
}
if (_usage_sensor != NULL) {
_usage_sensor->oops_do(f);
}
if (_gc_usage_sensor != NULL) {
_gc_usage_sensor->oops_do(f);
}
}
const char* name,
bool support_usage_threshold) :
}
}
const char* name,
bool support_usage_threshold) :
}
}
#ifndef SERIALGC
const char* name,
bool support_usage_threshold) :
}
}
#endif // SERIALGC
const char* name,
bool support_usage_threshold) :
}
}
}
}