diff src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp @ 139:c0492d52d55b

6539517: CR 6186200 should be extended to perm gen allocation to prevent spurious OOM's from perm gen Reviewed-by: ysr, jmasa
author apetrusenko
date Tue, 01 Apr 2008 15:13:47 +0400
parents a61af66fc99e
children c18cbe5936b8
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Thu Mar 27 17:22:06 2008 -0700
+++ b/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp	Tue Apr 01 15:13:47 2008 +0400
@@ -69,6 +69,9 @@
 
   GCCauseSetter gccs(heap, _gc_cause);
   _result = heap->failed_permanent_mem_allocate(_size);
+  if (_result == NULL && GC_locker::is_active_and_needs_gc()) {
+    set_gc_locked();
+  }
   notify_gc_end();
 }