Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Memory Management in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Memory Management in Java" Watch "Memory Management in Java" New topic
Author

Memory Management in Java

bala kan
Ranch Hand

Joined: Aug 20, 2012
Posts: 44
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

Joined: Mar 17, 2011
Posts: 7822
    
  21

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


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38898
    
  23
And welcome to the Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Memory Management in Java