mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
7066129: GarbageCollectorMXBean#getLastGcInfo leaks native memory
Make GCStatInfo a resource object Reviewed-by: phh, coleenp
This commit is contained in:
parent
d0b33ef971
commit
501bad4fd6
4 changed files with 13 additions and 12 deletions
|
@ -214,8 +214,8 @@ GCMemoryManager::~GCMemoryManager() {
|
|||
|
||||
void GCMemoryManager::initialize_gc_stat_info() {
|
||||
assert(MemoryService::num_memory_pools() > 0, "should have one or more memory pools");
|
||||
_last_gc_stat = new GCStatInfo(MemoryService::num_memory_pools());
|
||||
_current_gc_stat = new GCStatInfo(MemoryService::num_memory_pools());
|
||||
_last_gc_stat = new(ResourceObj::C_HEAP) GCStatInfo(MemoryService::num_memory_pools());
|
||||
_current_gc_stat = new(ResourceObj::C_HEAP) GCStatInfo(MemoryService::num_memory_pools());
|
||||
// tracking concurrent collections we need two objects: one to update, and one to
|
||||
// hold the publicly available "last (completed) gc" information.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue