src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
changeset 51385 be775229d3b3
parent 51268 4ac20e5f96ce
child 51742 3dd95a83791b
--- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp	Mon Aug 13 12:24:25 2018 +0200
+++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp	Mon Aug 13 12:24:25 2018 +0200
@@ -226,7 +226,9 @@
   // Assuming each thread's active tlab is, on average,
   // 1/2 full at a GC
   _target_refills = 100 / (2 * TLABWasteTargetPercent);
-  _target_refills = MAX2(_target_refills, (unsigned)1U);
+  // We need to set initial target refills to 2 to avoid a GC which causes VM
+  // abort during VM initialization.
+  _target_refills = MAX2(_target_refills, 2U);
 
   _global_stats = new GlobalTLABStats();