Mercurial > hg > truffle
changeset 21112:f01ebceea995
Graal should use same soft reference policy as C2
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 22 Apr 2015 16:34:32 -0700 |
parents | 91d70d102132 |
children | 0cf5897db25a |
files | src/share/vm/memory/referenceProcessor.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/memory/referenceProcessor.cpp Thu Mar 12 14:15:09 2015 +0100 +++ b/src/share/vm/memory/referenceProcessor.cpp Wed Apr 22 16:34:32 2015 -0700 @@ -57,8 +57,11 @@ 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) || defined(GRAAL) + _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"); }