count free heap

How to count in Java the free heap?

The problem is that Runtime.totalMemory() and Runtime.freeMemory() return only JVM memory!
kalexAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ccaprarConnect With a Mentor Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.