This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory Management in Java

 
bala kan
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
most authors said that total memory is the currently available memory for JVM like that.. but i Cant understand that. so please let me know the "Difference between max Memory and Total Memory in JVM" using simple Java Program..
 
Winston Gutkowski
Bartender
Pie
Posts: 9472
50
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bala kan wrote:most authors said that total memory is the currently available memory for JVM like that.. but i Cant understand that. so please let me know the "Difference between max Memory and Total Memory in JVM" using simple Java Program..

The problem is that what you ask is NOT simple. The java command has several parameters for setting available "memory" (and there's more than one type, and also 'low-' and 'high-'water marks for some values). This article seems to be quite good, and contains explanations about the various types of memory.

Personally, I rarely find I need to worry about it; so there may be better uses for your time until you do. But good hunting.

Winston
 
Campbell Ritchie
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic