Created
June 9, 2009 20:30
-
-
Save martint/126764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class A { | |
private final int dataSize = (int) (Runtime.getRuntime().maxMemory() * 0.6); | |
public void f() | |
{ | |
{ | |
byte[] data = new byte[dataSize]; | |
} | |
byte[] data2 = new byte[dataSize]; | |
} | |
public static void main(String[] args) | |
{ | |
A a = new A(); | |
a.f(); | |
} | |
} | |
public class B { | |
private final int dataSize = (int) (Runtime.getRuntime().maxMemory() * 0.6); | |
public void f() | |
{ | |
{ | |
byte[] data = new byte[dataSize]; | |
} | |
int i = 0; | |
byte[] data2 = new byte[dataSize]; | |
} | |
public static void main(String[] args) | |
{ | |
B b = new B(); | |
b.f(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment