tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhruva B. Reddy" <>
Subject RE: heap size
Date Wed, 23 Jul 2003 17:22:36 GMT
I recently discovered these two methods, and was wondering how accurate
they are.

I am a bit confused: I am running Tomcat 4.1.18 on Linux, with JDK
1.4.1_03-b02.  Nowhere in the startup scripts do I see it specified how
much memory to use (i.e., with the -Xmx flag).  When I call
Runtime.totalMemory(), it gives me 128MB, yet I was under the
impression that the JVM sets aside 64MB by default.

On a possibly unrelated note, is it feasible to force garbage
collection on Tomcat's JVM, either through Tomcat or the JVM itself? 
Googling has revealed only the official answer to this question, but
I've heard that most profilers can do this.


--- "Shapira, Yoav" <> wrote:
> Howdy,
> >Thanks Yoav - one last dumb question and I will leave you alone! So
> by
> There's more than one in this email ;)  And no question is dumb
> (although that assertion is frequently tested on this list).
> >adding that to my environment variables list, Tomcat knows to add it
> as
> a
> >startup parameter for Java? Or do I need to specify something else
> in
> the
> No, it's one of a small set of variables documented in
> $CATALINA_HOME/bin/ that tomcat looks for.  Environment
> variables don't need to be on the classpath.
> >Is there an easy way to check the JVM to
> >see the parameters once it is running??
> Generally, no, but there are some exceptions.  Although in this
> specific
> case, you can get memory information via Runtime#totalMemory() and
> Runtime#freeMemory().
> Yoav Shapira
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender.  Thank you.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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

View raw message