< prev index next >

src/share/vm/gc/shared/referenceProcessor.cpp

Print this page

        

@@ -52,12 +52,15 @@
   _soft_ref_timestamp_clock = now;
   // Also update the soft ref clock in j.l.r.SoftReference
   java_lang_ref_SoftReference::set_clock(_soft_ref_timestamp_clock);
 
   _always_clear_soft_ref_policy = new AlwaysClearPolicy();
-  _default_soft_ref_policy      = new COMPILER2_PRESENT(LRUMaxHeapPolicy())
-                                      NOT_COMPILER2(LRUCurrentHeapPolicy());
+#if defined(COMPILER2) || INCLUDE_JVMCI
+  _default_soft_ref_policy      = new LRUMaxHeapPolicy();
+#else
+  _default_soft_ref_policy      = new LRUCurrentHeapPolicy();
+#endif
   if (_always_clear_soft_ref_policy == NULL || _default_soft_ref_policy == NULL) {
     vm_exit_during_initialization("Could not allocate reference policy object");
   }
   guarantee(RefDiscoveryPolicy == ReferenceBasedDiscovery ||
             RefDiscoveryPolicy == ReferentBasedDiscovery,
< prev index next >