Mercurial > hg > truffle
comparison src/share/vm/services/memoryManager.cpp @ 4844:bf864f701a4a
7066129: GarbageCollectorMXBean#getLastGcInfo leaks native memory
Summary: Make GCStatInfo a resource object
Reviewed-by: phh, coleenp
author | dsamersoff |
---|---|
date | Wed, 25 Jan 2012 02:29:05 +0400 |
parents | b5a5f30c483d |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
4842:583b428aa858 | 4844:bf864f701a4a |
---|---|
212 delete _current_gc_stat; | 212 delete _current_gc_stat; |
213 } | 213 } |
214 | 214 |
215 void GCMemoryManager::initialize_gc_stat_info() { | 215 void GCMemoryManager::initialize_gc_stat_info() { |
216 assert(MemoryService::num_memory_pools() > 0, "should have one or more memory pools"); | 216 assert(MemoryService::num_memory_pools() > 0, "should have one or more memory pools"); |
217 _last_gc_stat = new GCStatInfo(MemoryService::num_memory_pools()); | 217 _last_gc_stat = new(ResourceObj::C_HEAP) GCStatInfo(MemoryService::num_memory_pools()); |
218 _current_gc_stat = new GCStatInfo(MemoryService::num_memory_pools()); | 218 _current_gc_stat = new(ResourceObj::C_HEAP) GCStatInfo(MemoryService::num_memory_pools()); |
219 // tracking concurrent collections we need two objects: one to update, and one to | 219 // tracking concurrent collections we need two objects: one to update, and one to |
220 // hold the publicly available "last (completed) gc" information. | 220 // hold the publicly available "last (completed) gc" information. |
221 } | 221 } |
222 | 222 |
223 void GCMemoryManager::gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, | 223 void GCMemoryManager::gc_begin(bool recordGCBeginTime, bool recordPreGCUsage, |