Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 1045:fa2f65ebeb08
6870843: G1: G1 GC memory leak
Summary: The fix addresses two memory leaks in G1 code: (1) _evac_failure_scan_stack - a resource object allocated on the C heap was not freed; (2) RSHashTable were linked into deleted list which was only cleared at full GC.
Reviewed-by: tonyp, iveresov
author | apetrusenko |
---|---|
date | Tue, 27 Oct 2009 02:42:24 -0700 |
parents | 6270f80a7331 |
children | 3fc996d4edd2 |
comparison
equal
deleted
inserted
replaced
1044:6270f80a7331 | 1045:fa2f65ebeb08 |
---|---|
3134 void G1CollectedHeap::finalize_for_evac_failure() { | 3134 void G1CollectedHeap::finalize_for_evac_failure() { |
3135 assert(_evac_failure_scan_stack != NULL && | 3135 assert(_evac_failure_scan_stack != NULL && |
3136 _evac_failure_scan_stack->length() == 0, | 3136 _evac_failure_scan_stack->length() == 0, |
3137 "Postcondition"); | 3137 "Postcondition"); |
3138 assert(!_drain_in_progress, "Postcondition"); | 3138 assert(!_drain_in_progress, "Postcondition"); |
3139 // Don't have to delete, since the scan stack is a resource object. | 3139 delete _evac_failure_scan_stack; |
3140 _evac_failure_scan_stack = NULL; | 3140 _evac_failure_scan_stack = NULL; |
3141 } | 3141 } |
3142 | 3142 |
3143 | 3143 |
3144 | 3144 |