tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: tomcat memory usage
Date Wed, 27 Jan 2010 20:24:21 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 1/27/2010 2:50 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Subject: Re: tomcat memory usage
>>
>> The compiler knows that the "staticObject" member is static, and might
>> even be able to tell the runtime that the object to be used for that
>> static member should go into PermGen.
> 
> You're confusing the reference with the object it points to. The
> field containing the reference is in PermGen, the object the reference refers
> to is in the main heap.

I /was/ confused about your description, and I was sure that the object
itself was stored in the heap. All you're saying is that, since Class
objects are stored in PermGen, the memory required for their static
object references is also stored in PermGen. That makes complete sense
to me.

>> The runtime doesn't know until the putstatic call that the object is
>> destined to be a static reference.
> 
> See above; "reference" != "object", but "reference" == pointer to
> "object".  (But I think you know that.)

Thanks for the OO semantics lesson, professor :) I think my above
statement was missing the "pointed to by a static reference".

> No, the object will never migrate to PermGen space.  (Nothing ever
> migrates across the PermGen / main heap boundary, in either
> direction.)

Good to know. What else goes into PermGen, other than java.lang.Class
objects?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktgoPUACgkQ9CaO5/Lv0PBmwQCeKZrCwPTT9Kp8V8qswxCZ4OKk
Q3AAoJpZYaVBSGoQPmYn1c92mGxSlsHk
=UiYy
-----END PGP SIGNATURE-----

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


Mime
View raw message