Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to check memory size allocated to JVM?

Reply
Thread Tools

How to check memory size allocated to JVM?

 
 
Laura Heinzmann
Guest
Posts: n/a
 
      02-16-2005
Hi:

Is there a way I can check the memory size allocated to a JVM?

LH
 
Reply With Quote
 
 
 
 
John McGrath
Guest
Posts: n/a
 
      02-16-2005
On 2/15/2005 at 9:55:06 PM, Laura Heinzmann wrote:

> Is there a way I can check the memory size allocated to a JVM?


See the Runtime class, freeMemory(), maxMemory() & totalMemory() methods.
Note that the totalMemory() value will generally not match what is shown
by operating system utilities such as the Windows task manager or the *nix
ps command. I think that is based on the amount of memory that the JVM
has malloc'd, and does not include code space, static data, etc.

--
Regards,

John McGrath
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check whether malloc has allocated memory properly in case ifmalloc(0) can return valid pointer Shivanand Kadwadkar C Programming 83 01-08-2011 08:18 AM
Re: How to check whether malloc has allocated memory properly in caseif malloc(0) can return valid pointer Gene C Programming 0 12-20-2010 05:33 AM
How to check allocated memory size NewToCPP C++ 5 12-08-2005 07:56 PM
Dynamically Allocated Memory vs. Statically allocated Memory csnerd@gmail.com C++ 5 12-09-2004 01:44 AM
Size of Allocated Memory mandark_br C Programming 3 05-06-2004 04:39 PM



Advertisments