9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @library /runtime/testlibrary
27 * @modules java.base/jdk.internal.misc
28 * @modules java.compiler
29 * @build GeneratedClassLoader
30 * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace
31 */
32
33 import java.io.IOException;
34
35 /**
36 * Test that tries to fragment the native memory used by class loaders.
37 * This test creates class loaders that load classes of increasing size for every
38 * iteration. By increasing the size of the class meta data needed for every iteration
39 * we stress the subsystem for allocating native memory for meta data.
40 */
41 public class FragmentMetaspace {
42
43 public static Class<?> c;
44
45 public static void main(String... args) {
46 runGrowing(Long.valueOf(System.getProperty("time", "80000")),
47 Integer.valueOf(System.getProperty("iterations", "200")));
48 // try to clean up and unload classes to decrease
49 // class verification time in debug vm
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @library /runtime/testlibrary
27 * @modules java.base/jdk.internal.misc
28 * @modules java.compiler
29 * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace
30 */
31
32 import java.io.IOException;
33
34 /**
35 * Test that tries to fragment the native memory used by class loaders.
36 * This test creates class loaders that load classes of increasing size for every
37 * iteration. By increasing the size of the class meta data needed for every iteration
38 * we stress the subsystem for allocating native memory for meta data.
39 */
40 public class FragmentMetaspace {
41
42 public static Class<?> c;
43
44 public static void main(String... args) {
45 runGrowing(Long.valueOf(System.getProperty("time", "80000")),
46 Integer.valueOf(System.getProperty("iterations", "200")));
47 // try to clean up and unload classes to decrease
48 // class verification time in debug vm
|