Hmmmm... using the example, in the topic, that Fred referenced. It looks like there is a (slightly below) 2 gigabyte size limit for integer arrays.
For example, when I try this...
int[] j = new int[Integer.MAX_VALUE/4];
I get an out of memory condition. However, when I do this...
It works fine, even though this second case allocates more memory.
BTW, I used a "-Xmx20g" switch for the heap, so the out of memory condition is not due to the heap size.
Henry