tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: tomcat memory usage
Date Wed, 27 Jan 2010 20:24:21 GMT
Hash: SHA1


On 1/27/2010 2:50 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz []
>> 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

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message