Allocation, as you have done it, is a recurrent discussion issue that is better approached by writing a short test stub to do nothing except the allocation and just see what happens.
I wrote a program recently to test such a thing, ran through five or ten loops before the memory issue slowed things down. Start with 1024 x 64 or something, I would not think a [1024][1024] to be too far from blowout, but we have to realize that the two numerics multiply as a [][]
|
Code:
|
public class HeapHog
{
public static void main(String[] args)
{
try
{
int[][] Flint = new int[1024][1024];//
Flint = null;
System.out.println("Suprisingly large");
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
}
} |
output:
If you find a use for a 1024 by 1024 memory space, you will be in the database forum or something. Possibly some games could use this sort of space.