-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Konstantin,
On 5/24/12 8:42 AM, Konstantin Kolinko wrote: > 2012/5/24 Christian Kaufhold <kaufhol...@googlemail.com>: >> Hi, >> >> I have a leaking Tomcat App I checked the heap with the Eclipse >> Memory Analyser and it says >> >> The classloader/component >> *"org.apache.catalina.loader.WebappClassLoader @ 0x94532f50"* >> occupies *376.421.152 (79,51%)* bytes. The memory is accumulated >> in one instance of *"java.util.HashMap$Entry[]"* loaded by >> *"<system class loader>"*. >> > > So the memory is used for something useful? That is not a "memory > leak". It is just a web application requiring a lot of memory. > > WebappClassLoader is the classloader that is used to load the > classes of your webapp. Of course, it remembers every class that > it loaded (to satisfy repeated class.forName() calls) and every > class that it loads has a reference it it (via > getClass().getClassLoader()). > > There may be many classes, but I do not think that the classloader > itself is responsible for 300 Mb of memory. It may, if the ClassLoader holds references to Class objects (it does) that contain static members with lots of data (not so sure about this part). >> and the data that is in the entries of the gigantic Map is >> org.hibernate.impl.SessionFactoryObjectFactory > > That would be a hibernate question. I have no clue what that class > is about. +1 - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk++T9YACgkQ9CaO5/Lv0PAwAQCfZSz67ALyFrRfZaVYs6Tjoee7 Q4UAnA/Q2vIjecxXPEW+BzsN7GeSJQk3 =zQcP -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org