[Scilab-users] Still available memory on the Java heap

Samuel Gougeon sgougeon at free.fr
Mon Oct 28 13:30:13 CET 2019


Hello,

Le 22/07/2019 à 16:01, Clément David a écrit :
> Hello Samuel,
>
> You can get memory information from the JVM using JIMS:
>
> --> jimport java.lang.Runtime
>
> --> Runtime.getRuntime().totalMemory()
>   ans  =
>
>    249036800

I do not get an amount matching the Scilab setting:

--> jimport java.lang.Runtime
--> Runtime.getRuntime().totalMemory()
  ans  =
   111149056

--> // while we could expect, with my Scilab < 6.0.2 session
--> getPreferencesValue("//general/body/java-heap-memory","heap-size")
  ans  =
  256

--> // or with Scilab >= 6.0.2:
--> xmlGetValues("//general/body/java-heap-memory","heap-size")
  ans  =
  256

What could explain this difference? There is still much more than 256 MB 
free RAM on my computer.
 From here, is the amount of available Java memory as doubtful as for 
the total memory?

Best regards
Samuel

PS: related java page: 
https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Runtime.html



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191028/4388fe03/attachment.htm>


More information about the users mailing list