diff src/share/vm/runtime/arguments.cpp @ 695:becb17ad5e51

6824570: ParNew: Fix memory leak introduced in 6819891 Summary: Allocate worker-local overflow stacks, introduced in 6819891, along with ParNewGeneration, rather than with the per-scavenge ParScanThreadState. Reviewed-by: jmasa
author ysr
date Thu, 02 Apr 2009 15:57:41 -0700
parents bd441136a5ce
children 922aedc96ef5
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Sat Mar 28 15:47:29 2009 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Thu Apr 02 15:57:41 2009 -0700
@@ -971,7 +971,7 @@
   } else {
     no_shared_spaces();
 
-    // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 correspondinly,
+    // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 respectively,
     // these settings are default for Parallel Scavenger. For ParNew+Tenured configuration
     // we set them to 1024 and 1024.
     // See CR 6362902.
@@ -987,6 +987,16 @@
     if (AlwaysTenure) {
       FLAG_SET_CMDLINE(intx, MaxTenuringThreshold, 0);
     }
+    // When using compressed oops, we use local overflow stacks,
+    // rather than using a global overflow list chained through
+    // the klass word of the object's pre-image.
+    if (UseCompressedOops && !ParGCUseLocalOverflow) {
+      if (!FLAG_IS_DEFAULT(ParGCUseLocalOverflow)) {
+        warning("Forcing +ParGCUseLocalOverflow: needed if using compressed references");
+      }
+      FLAG_SET_DEFAULT(ParGCUseLocalOverflow, true);
+    }
+    assert(ParGCUseLocalOverflow || !UseCompressedOops, "Error");
   }
 }