Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM memory use

 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to understand the relationship between the memory that the JVM obtains for an application and the memory footprint that can be seen for the application on the windows process list.

In my application I can at any time see:
1. Total memory held by JVM
2. Free memory in JVM
3. Maximum memory allowed to be used by JVM

Using:


Most of the time, the memory used as shown on the windows process list never matches any of these numbers (or combinations). An example comparison when the application has been running for an hour or so is:

Total memory held = 24MB
Free memory in JVM = 4MB
Maximum allowed memory = 63MB

Windows process list shows javaw.exe using 50,008K

Reason for all of this is that I believe some operations are failing because of a lack of memory, but I firstly wanted to understand what these numbers mean.

I expected the process listing memory size to match total JVM memory held. Can anyone explain why they are different?

Cheers, Jared.
[ August 02, 2005: Message edited by: Jared Cope ]
 
Joe Ess
Bartender
Pie
Posts: 9264
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Although these memory inspection methods are useful, they only measure the object heap. Objects are not the only things that contribute to a program's RAM footprint. The only thing you can say for sure about the relationship between the memory usage calculated with the Runtime methods and the actual amount of memory your program requires is that the actual requirements are much larger.


Java Platform Performance - RAM Footprint
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Originally posted by Joe Ess:


Java Platform Performance - RAM Footprint


Thanks. Exactly what I needed to know.

Cheers, Jared.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic