-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chuck,
On 1/27/2010 11:28 AM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: tomcat memory usage >> >> All Java objects and their associated data are stored >> within the heap. > > Well... no. The OP's original question was about what was outside > the > -Xmx heap setting, and Class objects and the associated static fields > are /not/ included in that value. Instances of java.lang.Class and the > static fields are kept in PermGen, which is separate from the regular > Java heap, and sized independently of -Xmx. Fair enough. >> Unless you are writing JNI code, then everything you are >> effecting is happening in the heap. > > Also not strictly true, since a major chunk of the JVM and JRE are > native code, and consume considerable amounts of process space to > implement the Java operations. What I meant was that you can create as many objects as you want in Java and you aren't really stepping outside the Java heap. If you write JNI code, you can call malloc as much as you want and /that/ would be outside the Java heap. The OP can only cause the JVM to allocate a lot of memory for non-Java-heap items indirectly... say, but opening a bunch of sockets, creating a bunch of threads, etc. >> Static variables and references (which are the same thing, >> depending on how you see things) are not special in any way >> when it comes to memory use. > > Other than their location outside of the -Xmx-controlled heap. So, static members are stored outside the heap? Where are they stored? PermGen? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktgiEkACgkQ9CaO5/Lv0PAKKACgmDoe/8LislL/gddXNbyaeENM 7ysAoI8pT7suqp0zPphCQEIng8K+1md1 =QVxm -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org