Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

count free heap

How to count in Java the free heap?

The problem is that Runtime.totalMemory() and Runtime.freeMemory() return only JVM memory!
0
kalex
Asked:
kalex
1 Solution
 
ccaprarCommented:
You should try using JNI and API calls (if you are using Win platforms).
0
 
objectsCommented:
What exactly are you meaning when you say 'free heap'?
0
 
kalexAuthor Commented:
The 'free heap' means a part of RAM available to an  application.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
objectsCommented:
That's a platform independant thing, so you'll need to implement seperate platform specific solutions using either exec() or JNI.
0
 
CleanupPingCommented:
kalex:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
sudhakar_koundinyaCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to ccaprar]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now