JDK-2145723 : Deoptimization code of Java 1.5.x looks leaking memory.
  • Type: Backport
  • Backport of: JDK-6502317
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2007-01-10
  • Updated: 2010-04-02
  • Resolved: 2007-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
5.0u12,hs10Fixed hs10Fixed
Comments
EVALUATION didn't free MonitorChunk when disposing of a vframeArrayElement
12-01-2007

SUGGESTED FIX vframeArray.hpp MonitorChunk* monitors(void) const { return _monitors; } + void free_monitors(JavaThread* jt); + vframeArray.cpp + void vframeArrayElement::free_monitors(JavaThread* jt) { + if (_monitors != NULL) { + MonitorChunk* chunk = _monitors; + _monitors = NULL; + jt->remove_monitor_chunk(chunk); + delete chunk; + } + } + void vframeArray::deallocate_monitor_chunks() { JavaThread* jt = JavaThread::current(); for (int index = 0; index < frames(); index++ ) { ! MonitorChunk* chunk = element(index)->monitors(); ! if (chunk != NULL) { ! jt->remove_monitor_chunk(chunk); } } - } #ifndef PRODUCT bool vframeArray::structural_compare(JavaThread* thread, GrowableArray* chunk) { if (owner_thread() != thread) return false; int index = 0; #if 0 // FIXME can't do this comparison // Compare only within vframe array. for (deoptimizedVFrame* vf = deoptimizedVFrame::cast(vframe_at(first_index())); vf; vf = vf->deoptimized_sender_or_null()) { --- 517,539 ---- ShouldNotReachHere(); #endif #endif deallocate_monitor_chunks(); } void vframeArray::deallocate_monitor_chunks() { JavaThread* jt = JavaThread::current(); for (int index = 0; index < frames(); index++ ) { ! element(index)->free_monitors(jt); } }
12-01-2007