2G array size limit. Any future workarounds?
843829Apr 6 2007 — edited May 20 2008Hi,
If you are one of the people working with large 3D image volumes, you know this problem. Currently, some of the analyze image volumes we deal with are in the dimension of 10,000 x 10,000 x 14, or 1024 x 1024 x 1024, and the technology is improving to give us even higher resolution scans.
Currently, most people load the 3D image data into the memory as a single array, so that viewing images in one of the three planes merely involves some simple pixelStride, rowStride and startOffset. However this approach eventually would result in overflow of array size of Java, which uses int and the maximum size is 2 billion.
Even with the 64-bit JVM, we may be able to load data that's larger than 4GB (e.g. 2G of ints), but this is becoming a problem. Certainly we can change the algorithm in terms of how we load the data, but such change isn't trivial as many algorithms already uses this approach.
The question is, how Java is going to address this problem? Thanks.