in my unit test, I'm intentionally trying to raise an OutOfMemoryError exception. I use a simple operator as follows:
byte[] block = new byte[128 * 1024 * 1024 * 1024];
The code runs on Win7 64bit with jdk6u21 64bit. But when I run this on Centos 5 64bit with jdk6u21, you selected OutOfMemoryError, even if the size of the array is larger.
Any idea?
source
share