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

classic Classic list List threaded Threaded
3 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

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

Hello,

Is there a way equivalent to getmemory() to get the free memory on the
reserved Scilab java heap?

xmlGetValues() can be used to get the total reserved java heap amount,
but i would need to know the still free not yet used memory.

Thanks
Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: Still available memory on the Java heap

Hello Samuel,

You can get memory information from the JVM using JIMS:

--> jimport java.lang.Runtime

--> Runtime.getRuntime().totalMemory()
 ans  =

  249036800


--> Runtime.getRuntime().freeMemory()
 ans  =

  175335480

Regards,

--
Clément DAVID

> -----Original Message-----
> From: users <[hidden email]> On Behalf Of Samuel Gougeon
> Sent: Thursday, July 18, 2019 11:21 AM
> To: International users mailing list for Scilab. <[hidden email]>
> Subject: [Scilab-users] Still available memory on the Java heap
>
> Hello,
>
> Is there a way equivalent to getmemory() to get the free memory on the
> reserved Scilab java heap?
>
> xmlGetValues() can be used to get the total reserved java heap amount, but i
> would need to know the still free not yet used memory.
>
> Thanks
> Samuel
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Still available memory on the Java heap

Hello Clément,

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
>
>
> --> Runtime.getRuntime().freeMemory()
>   ans  =
>
>    175335480

Excellent!
Thanks a lot.

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users