1Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
2DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
4This code is free software; you can redistribute it and/or modify it
5under the terms of the GNU General Public License version 2 only, as
6published by the Free Software Foundation.
7
8This code is distributed in the hope that it will be useful, but WITHOUT
9ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11version 2 for more details (a copy is included in the LICENSE file that
12accompanied this code).
13
14You should have received a copy of the GNU General Public License version
152 along with this work; if not, write to the Free Software Foundation,
16Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
18Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19or visit www.oracle.com if you need additional information or have any
20questions.
21
22Test garbage collector compaction.
23
24The test starts several threads which create objects using
25given garbage producer until OOM. The references are kept
26in an array. The references to even elements are cleared
27and objects of double size are created until OOM. The garbage
28collector will have to compact free space to free memory for
29new objects.
30
31The tests differ by object types used for first and second phase:
32- _Arrays tests randomly use arrays of basic types and Object[] arrays.
33- _Strings tests use random strings.
34- _NonbranchyTree tests use nonbranchy trees.
35- _InternedStrings use interned strings.
36- _ArrayOf tests use array with two elements for second phase,
37the elements of which point to objects of same type.
38- _TwoFields tests use object with two fields for second phase,
39which point to objects of same type.
40
41Each *1 test is the single-threaded version of corresponding test.
42
43The Humongous tests are similar to compact tests. However they used
44the fixed size of objects which allocation requre compaction. The
45size is specific for G1 GC (about 1M and 5M) and require humongous
46object creation in G1.
47