(String[] args)
| 11 | private static final int REALLOC_SIZE = 30000170; |
| 12 | |
| 13 | public static void main(String[] args) throws InterruptedException { |
| 14 | final boolean once = args.length > 0 && args[0].equals("once"); |
| 15 | |
| 16 | do { |
| 17 | long addr = Native.malloc(MALLOC_SIZE); |
| 18 | long reallocd = Native.realloc(addr, REALLOC_SIZE); |
| 19 | |
| 20 | // allocate every 1 second. |
| 21 | Thread.sleep(1000); |
| 22 | } while (!once); |
| 23 | } |
| 24 | } |