I set the heap size needed in the file eclipse.inias follows:
-Xms256m
-Xmx1024m
Is there a way to access this value of 1024 MB (maximum heap size) from Java code? Here I do not need the JVM heap size, instead I need the heap size set during eclipse startup.
One pointer that I could find is when I check the Show Heap Status preference in eclipse settings, I get a view showing the current heap usage and maximum heap size (the value set in the eclipse.ini file). Therefore, I think there is an API that this view uses to read values from an ini file.
Any pointers to the class name used to display this heap state monitor will also be helpful. Below is a link to the heap state monitor screen taken in eclipse, which selects the heap size specified in the ini file and displays the same.

source
share