Very well, I just tried to inspire someone on how to 'pump up memory usage'. It wasn't about the details.
In fact: one line of code doesn't compile without a class and method declaration. So you could have mailed me a java-for-beginners manual. :-) Cheers, Ronald. Op woensdag, 19 augustus 2009 22:49 schreef Christopher Schultz <ch...@christopherschultz.net>:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ronald, On 8/19/2009 5:32 AM, Ronald Klop wrote: > byte[] b = new byte[10000000000]; Java limits arrays to 2147483648 elements, so the above shouldn't even compile (and it doesn't for me). Section 2.15.4 of the JLS says: " A component of an array is accessed using an array access expression. Arrays may be indexed by int values; short, byte, or char values may also be used as they are subjected to unary numeric promotion (ยง2.6.10) and become int values. " Integer.MAX_VALUE is 2147483647 so the largest array you can allocate will actually have 2147483647 elements (and not 2147483648). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqMZWQACgkQ9CaO5/Lv0PCIpACggoYXUr4aMq6bg35Irkxto4qd xcAAn2EgjuBtsRRpdWPH9y1VNl8PLgRw =f3l7 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org