test/hotspot/jtreg/gc/TestSoftReferencesBehaviorOnOOME.java
author jiangli
Fri, 02 Nov 2018 19:30:31 -0400
changeset 52397 1322829d1501
parent 50525 767cdb97f103
child 53523 4c5184c56dc2
permissions -rw-r--r--
8209564: runtime/appcds/CDSandJFR.java timeout on tier6 on sparc Summary: Set timeout 500 in CDSandJFR.java Reviewed-by: dcubed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     1
/*
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
     2
 * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     4
 *
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     8
 *
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    13
 * accompanied this code).
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    14
 *
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    18
 *
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    21
 * questions.
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    22
 */
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    23
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    24
/**
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    25
 * @test TestSoftReferencesBehaviorOnOOME
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    26
 * @key gc
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    27
 * @summary Tests that all SoftReferences has been cleared at time of OOM.
50525
767cdb97f103 8204210: Implementation: JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental)
pliden
parents: 47216
diff changeset
    28
 * @requires vm.gc != "Z"
40631
ed82623d7831 8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents: 36851
diff changeset
    29
 * @library /test/lib
36851
03e2f4d0a421 8153737: Unsupported Module
chegar
parents: 30607
diff changeset
    30
 * @modules java.base/jdk.internal.misc
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    31
 * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 512 2k
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    32
 * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 128k 256k
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    33
 * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 2k 32k
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    34
 */
30604
b8d532cb6420 8067013: Rename the com.oracle.java.testlibary package
ykantser
parents: 29678
diff changeset
    35
import jdk.test.lib.Utils;
30607
hseigel
parents: 30604 30557
diff changeset
    36
import jdk.test.lib.Asserts;
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    37
import java.lang.ref.SoftReference;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    38
import java.util.LinkedList;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    39
import java.util.Random;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    40
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    41
public class TestSoftReferencesBehaviorOnOOME {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    42
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    43
    /**
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    44
     * Test generates a lot of soft references to objects with random payloads.
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    45
     * Then it provokes OOME and checks that all SoftReferences has been gone
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    46
     * @param args - [minSize] [maxSize] [freq]
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    47
     *  where
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    48
     *  - minSize - min size of random objects
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    49
     *  - maxSize - max size of random objects
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    50
     */
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    51
    public static void main(String[] args) {
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    52
        long minSize = DEFAULT_MIN_SIZE;
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    53
        long maxSize = DEFAULT_MAX_SIZE;
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    54
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    55
        if ( args.length >= 2) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    56
            maxSize = getBytesCount(args[1]);
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    57
        }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    58
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    59
        if ( args.length >= 1) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    60
            minSize = getBytesCount(args[0]);
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    61
        }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    62
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    63
        new TestSoftReferencesBehaviorOnOOME().softReferencesOom(minSize, maxSize);
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    64
    }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    65
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    66
    /**
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    67
     * Test that all SoftReferences has been cleared at time of OOM.
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    68
     */
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    69
    void softReferencesOom(long minSize, long maxSize) {
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    70
        System.out.format( "minSize = %d, maxSize = %d%n", minSize, maxSize );
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    71
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    72
        LinkedList<SoftReference> arrSoftRefs = new LinkedList();
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    73
        staticRef = arrSoftRefs;
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    74
        LinkedList arrObjects = new LinkedList();
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    75
        staticRef = arrObjects;
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    76
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    77
        long multiplier = maxSize - minSize;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    78
        long numberOfNotNulledObjects = 0;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    79
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    80
        try {
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    81
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    82
            // Lets allocate as many as we can - taking size of all SoftRerefences
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    83
            // by minimum. So it can provoke some GC but we surely will allocate enough.
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    84
            long numSofts = (long) ((0.95 * Runtime.getRuntime().totalMemory()) / minSize);
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    85
            System.out.println("num Soft: " + numSofts);
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    86
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    87
            while (numSofts-- > 0) {
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    88
                int allocationSize = ((int) (RND_GENERATOR.nextDouble() * multiplier))
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    89
                            + (int)minSize;
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    90
                arrSoftRefs.add(new SoftReference(new byte[allocationSize]));
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    91
            }
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    92
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    93
            System.out.println("free: " + Runtime.getRuntime().freeMemory());
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    94
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    95
            // provoke OOME.
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    96
            while (true) {
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    97
                arrObjects.add(new byte[(int) Runtime.getRuntime().totalMemory()]);
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
    98
            }
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
    99
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   100
        } catch (OutOfMemoryError oome) {
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   101
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   102
            // Clear allocated ballast, so we don't get another OOM.
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   103
            staticRef = null;
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   104
            arrObjects = null;
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   105
            long oomSoftArraySize = arrSoftRefs.size();
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   106
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   107
            for (SoftReference sr : arrSoftRefs) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   108
                Object o = sr.get();
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   109
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   110
                if (o != null) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   111
                    numberOfNotNulledObjects++;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   112
                }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   113
            }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   114
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   115
            // Make sure we clear all refs before we return failure
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   116
            arrSoftRefs = null;
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   117
            Asserts.assertFalse(numberOfNotNulledObjects > 0,
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   118
                    "" + numberOfNotNulledObjects + " out of "
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   119
                    + oomSoftArraySize + " SoftReferences was not "
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   120
                    + "null at time of OutOfMemoryError"
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   121
            );
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   122
        } finally {
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   123
            Asserts.assertTrue(arrObjects == null, "OOME hasn't been provoked");
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   124
            Asserts.assertTrue(arrSoftRefs == null, "OOME hasn't been provoked");
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   125
        }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   126
    }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   127
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   128
    private static final long getBytesCount(String arg) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   129
        String postfixes = "kMGT";
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   130
        long mod = 1;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   131
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   132
        if (arg.trim().length() >= 2) {
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   133
            mod = postfixes.indexOf(arg.trim().charAt(arg.length() - 1));
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   134
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   135
            if (mod != -1) {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   136
                mod = (long) Math.pow(1024, mod+1);
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   137
                arg = arg.substring(0, arg.length() - 1);
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   138
            } else {
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   139
                mod = 1; // 10^0
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   140
            }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   141
        }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   142
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   143
        return Long.parseLong(arg) * mod;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   144
    }
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   145
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   146
    private static final Random RND_GENERATOR = Utils.getRandomInstance();
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   147
    private static final long DEFAULT_MIN_SIZE = 512;
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   148
    private static final long DEFAULT_MAX_SIZE = 1024;
30557
8ba511484c3f 8073669: gc/TestSoftReferencesBehaviorOnOOME.java times out in nightlies
azakharov
parents: 29678
diff changeset
   149
    private static Object staticRef; // to prevent compile optimisations
27606
1c687c6de038 8059661: Test SoftReference and OOM behavior
azakharov
parents:
diff changeset
   150
}