Created
April 22, 2012 02:57
-
-
Save gvsmirnov/2444045 to your computer and use it in GitHub Desktop.
Produces an OutOfMemoryError! Whoa!
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 TheForceTester { | |
public static final int ARRAY_SIZE = 1000000; | |
public static void main(String[] args) { | |
while (true) { | |
byte[] lotsOfUsefulData = new byte[ARRAY_SIZE]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment