Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Memory Management in Java  RSS feed

 
bala kan
Ranch Hand
Posts: 44
  • 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
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • 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
Posts: 55324
157
  • 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
Boost this thread!