codegen: handle exceptions of a method
[mate.git] / tests / Garbage1.java
index 4b36d86727b653910666c3b2ab9f91f9ca73c068..4073cc808788dd5cefd16723bd1ae3e83d28bff8 100644 (file)
@@ -1,21 +1,37 @@
 package tests;
 
+//import jmate.lang.MateRuntime;
 
 public class Garbage1
 {
-       
+       static
+       {
+               loadLibrary();
+       }
+
+       public static void loadLibrary()
+       {
+               //Runtime.getRuntime().loadLibrary("MateRuntime");
+       }       
 
        public Garbage1(){}
 
        public static void main(String args[])
        {
+               //MateRuntime runtime = new MateRuntime();
+               System.out.println("a string object");
 
-               Big2 big2 = new Big2();
                for(int i=0;i<0x2800;i++)
                {
-                       big2 = new Big2();
+                       Big2 big2 = new Big2(); 
+                        if(i%0x1F==0) 
+                        { 
+                           //runtime.printMemoryUsage();
+                            System.out.printf("foo gah 0x%08x\n", i);
+                        }
+                        big2.foo();
                }
-               System.out.println("memory: todo");
+               System.out.println("done.");
        }
 }
 
@@ -25,7 +41,11 @@ class Big2
 
        public Big2()
        {
-               arr = new int[0x400];
+               arr = new int[0xF400];
                //System.out.println("foo");
        }
+        
+        public void foo()
+        {
+        }
 }