Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / August 2004

Tip: Looking for answers? Try searching our database.

64 bit java

Thread view: 
Roedy Green - 03 May 2004 22:41 GMT
In 64-bit Java's, is it possible to address arrays with longs?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Chris Smith - 03 May 2004 23:49 GMT
> In 64-bit Java's, is it possible to address arrays with longs?

No.  The implementation details of the VM do not change the semantics of
the language.

Signature

www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Michael Amling - 04 May 2004 14:49 GMT
> In 64-bit Java's, is it possible to address arrays with longs?

  The compiler requires an array index to be an int, if that's what
you're asking.

--Mike Amling
Roedy Green - 04 May 2004 18:46 GMT
>   The compiler requires an array index to be an int, if that's what
>you're asking.
I was wondering if the JVM had some extensions to let you also do long
arrays.  Apparently not.  

Shades of Segment registers to 64K chunks.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
glen herrmannsfeldt - 07 May 2004 22:48 GMT
> I was wondering if the JVM had some extensions to let you also do long
> arrays.  Apparently not.  

>>  The compiler requires an array index to be an int, if that's what
>>you're asking.

> Shades of Segment registers to 64K chunks.

Well, there is a big difference between 64K and 4G.

I never had so much trouble even in the 64K days, an array of
pointers to arrays, where each array was up to 64K was good enough
for the problems I was doing at the time.

An int subscript to a double array could be up to 32GB, and again
one can use two dimensional arrays (oops, arrays of object references
to arrays).

Still, I agree that it was a mistake to specify int subscripts
in the first place.

-- glen
Wee Jin Goh - 21 May 2004 22:38 GMT
>> I was wondering if the JVM had some extensions to let you also do long
>> arrays.  Apparently not.  
[quoted text clipped - 18 lines]
>
> -- glen

Wouldn't that be 16 GB since ints in Java are signed and only go up to
2^31 (hence 2GB * 8 = 16GB).

Wee Jin
JQ - 05 Aug 2004 06:32 GMT
> In 64-bit Java's, is it possible to address arrays with longs?

No, but therein lies a good point/question when instead I should go look
it up myself in the src.jar:

Do any of the Java Collections frameworks implementations utilize array
trees or are they all singly-indexed like ArrayList?

Signature

JQ

glen herrmannsfeldt - 15 Aug 2004 08:25 GMT
>> In 64-bit Java's, is it possible to address arrays with longs?

> No, but therein lies a good point/question when instead I should go look
> it up myself in the src.jar:

I thought the language specification said int, so it has
to be int.  I would call it a specification bug.

-- glen


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.