How to monitor the Java memory usage in matlab?

조회 수: 4 (최근 30일)
denzil fernandes
denzil fernandes 2016년 4월 1일
댓글: Walter Roberson 2016년 4월 5일
I have few java libraries which gets dynamically bounded to matlab at run time. Is it possible to know the memory usage of the Java libraries using matlab interface.

답변 (1개)

Dave Behera
Dave Behera 2016년 4월 4일
  댓글 수: 2
denzil fernandes
denzil fernandes 2016년 4월 5일
Hi, I just wanted to know how the following commands would help.
rJavaObj = java.lang.Runtime.getRuntime;
rJavaObj.freeMemory
rJavaObj.totalMemory
rJavaObj.maxMemory
Will these commands help me in finding the memory used by my java instance at that particular time or please could you let me know what do these commands return exactly.
Walter Roberson
Walter Roberson 2016년 4월 5일
If java has the memory allocated to it (totalMemory) but java is not currently using the memory for any object (freeMemory) then do you want to include it in the amount of memory that java is "using" for your purpose?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by