Brad Christiansen wrote:
Hi,

I think I must misunderstand what you are saying about array sizes but I very often initilise arrays with MUCH more than 7000
elements. The following code fills a double array with a million random doubles in one method with no issues.
That's because the array is initialisation is not in the method itself.
If you look at the JLS it says that automatic array initialisation is
expanded out to be lots of single lines of code so

  float[] foo = { 1, 2, 3, 4 };

get's expanded to this:

  float[] foo = new float[4];
  foo[0] = 1;
  foo[1] = 2;
  foo[2] = 3;
  foo[3] = 4;

Do that with a big-enough array and you hit the 64K byte per-method
limit really quickly -remembering that each of those values (1 - 4) are
represented as a floating point constant @ 8 bytes per constant.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to