Re: 2 GIG the new 640 MB



On Mon, 16 Jan 2006 00:06:19 -0800, Peter Ammon
<gershwin@xxxxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone
who said :

>But that doesn't mean that Java is automatically "64 bit ready" or ideal
>for 64 bit computers. For example, the length property of an array in
>Java is a 32 bit int even on a 64 bit machine - that means that no Java
>program will ever be able to create an array with more than 4 billion
>elements. Java will need to undergo a transition to 64 bit like any
>other framework out there.

I think that could go very smoothly. From the language level all you
have to do is relax the restriction on using longs in new [ ... ]. You
can continue to use ints even in a 64 bit system.

In the JVM, the new 64 bit array might be implemented with 32-bit or
64-bit code depending on how you allocated it.

the biggest problem is with array.length. Perhaps logically
autocasting it back to int when required. Perhaps there would be two
length commands, one int pseudofield length and a method length() that
gets a long.

It not nearly so frightening as adjusting your pointer arithmetic to
account for different sizes of items.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: How to get a raw IP-addr into byte-array?
    ... and sign-extends it to an int, which it passes to the println method. ... I assume that they mean an array like: ... my Java book clearly states that a byte is a SIGNED ...
    (comp.lang.java)
  • Re: 2 GIG the new 640 MB
    ... >>program will ever be able to create an array with more than 4 billion ... > autocasting it back to int when required. ... Java doesn't even see pointers -- unless one looks carefully. ...
    (comp.lang.java.advocacy)
  • Re: method parameters
    ... This is my second program with the JAVA, I need to use it to write ... The basic idiom for emulating pass by reference is to wrap the value in an array. ... public void someMethod(int w) ... public void resetSize(int x, int y) { ...
    (comp.lang.java.programmer)
  • Re: How much fast is C++ than Java?
    ... What you'll find is that the Java indexing rules are nothing like as ... multidimensional array is an array of array objects. ... int main ...
    (comp.lang.c)
  • Re: Creating Integer object from int
    ... >do I cast an array of int to an array of Integer? ... If you work with individual elements, ... http://mindprod.com Java custom programming, consulting and coaching. ...
    (comp.lang.java.help)