* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / mem.java
1
2 public class mem {
3         public int dummy;
4         
5         public static void main(String[] s) {
6                 int i;
7                 
8                 for (i=0; i<100000000; i++) {
9                         try {
10                                 byte[] b = new byte[10000];
11                                 b[0]=17;
12                                 } 
13                         catch (java.lang.Throwable c) {
14                                 System.out.print ("Out of mem after ");
15                                 System.out.print (i);
16                                 System.out.println (" allocations.");
17                                 }
18                         finally {
19                                 System.out.println ("OK");
20                                 }
21                         }
22                 
23                 
24                 }
25                 
26                 
27         }
28