JDK-4880587 : 64-Bit indexing for arrays
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 1.4.1,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux,windows_2000
  • CPU: itanium
  • Submitted: 2003-06-18
  • Updated: 2008-03-10
  • Resolved: 2007-01-12
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Name: jl125535			Date: 06/18/2003


A DESCRIPTION OF THE PROBLEM :
Array indexes are int-based! You cannot allocate an array
of any type that has more than 2^31 objects.  (See the 
Java Language Specification, Section 10.4 at 
http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html#25566)

API: Every Collection API can carry only 2^31 objects.

This RFE will also affect the JVM-Spec, 'cause the JVM can
handle only int-based array-indexes, as I know.

This is not covered by the current 64-Bit Version of the
runtime, because these versions give only support for the
memory management of the runtime itself - not for the
language constructs directly.

This is maybe an issue for the JCP ?


CUSTOMER WORKAROUND :
An array of arrays.
But this descreases the performance by the factor of 2 or more.
(Review ID: 180497) 
======================================================================

Comments
EVALUATION 4963452 is slightly better written, so I am making that the master request for 64-bit integral types.
12-01-2007

EVALUATION As the user notes, there is a workaround. This has not been a pressing issue so far. Perhaps it will be in the future. ###@###.### 2003-06-18
18-06-2003