Skip to content

Instantly share code, notes, and snippets.

@gvsmirnov
Created April 22, 2012 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gvsmirnov/2444045 to your computer and use it in GitHub Desktop.
Save gvsmirnov/2444045 to your computer and use it in GitHub Desktop.
Produces an OutOfMemoryError! Whoa!
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