Shouldn't type of 'size' be Long?

The constructors for Array, FloatArray, ByteArray, etc take a 'size' parameter of type Int

To allow full use of the memory addressing power of 64bit operating systems shouldn’t the type be Long?

Amazon’s memory-optimized EC2 instances have ~244 GB. On such machines a size parameter of Int just doesn’t cut it .

JVM only supports 32-bit integers as array indices. If you really need this, you probably can workaround that restriction using sun.misc.Unsafe or moving some code to the native.

Makes sense. Thanks for the tip about sun.misc.Unsafe.