This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
More new test code
- To: java-patches at sourceware dot cygnus dot com
- Subject: More new test code
- From: Anthony Green <green at cygnus dot com>
- Date: Sun, 16 Jan 2000 12:29:15 -0800
More new test code. Uses regexp matching.
2000-01-16 Anthony Green <green@cygnus.com>
* libjava.lang/pr93.xpo: New file.
* libjava.lang/pr93.java: New file.
Index: libjava/testsuite/libjava.lang/pr93.java
===================================================================
RCS file: pr93.java
diff -N pr93.java
--- /dev/null Tue May 5 13:32:27 1998
+++ pr93.java Sun Jan 16 12:26:51 2000
@@ -0,0 +1,24 @@
+// PR 93
+
+// Programs compiled with current libgcj dump core sometime after
+// garbage collection.
+
+public class pr93
+{
+ public static void main(String[] args) {
+ java.util.Random generator = new java.util.Random();
+ Runtime runtime = Runtime.getRuntime();
+
+ System.out.println("free memory = " + runtime.freeMemory());
+ System.out.println("total memory = " + runtime.totalMemory());
+
+ for (int n = 0; n < 10000; n++) {
+ byte[] junk = new byte[(generator.nextInt() & 0x7fffffff) % 512];
+ }
+
+ runtime.gc();
+
+ System.out.println("free memory = " + runtime.freeMemory());
+ System.out.println("total memory = " + runtime.totalMemory());
+ }
+}
Index: libjava/testsuite/libjava.lang/pr93.xpo
===================================================================
RCS file: pr93.xpo
diff -N pr93.xpo
--- /dev/null Tue May 5 13:32:27 1998
+++ pr93.xpo Sun Jan 16 12:26:51 2000
@@ -0,0 +1,4 @@
+free memory = [0-9]*
+total memory = [0-9]*
+free memory = [0-9]*
+total memory = [0-9]*