Re: pump up memory usage

2009-08-21 Thread Ronald Klop

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[100];

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

 








Re: pump up memory usage

2009-08-19 Thread Ronald Klop

byte[] b = new byte[100];




Op woensdag, 19 augustus 2009 10:51 schreef Thomas G. Lau 
thomas@ntt.com.hk:


Dear Tomcat Users,

how could I pump up memory usage on tomcat? we want to test if tomcat having 
any problem when changed environment from 32 bit 2GB limitation to 64bit larger 
 memory limitation mode. Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

 








Re: pump up memory usage

2009-08-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ronald,

On 8/19/2009 5:32 AM, Ronald Klop wrote:
 byte[] b = new byte[100];

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