Java Heap Cleaner

버전 1.11.0.0 (2.33 KB) 작성자: Davide Tabarelli
Simple function cleaning up, at runtime, Java heap memory, thus preventing java OutOfMemory error
다운로드 수: 3.9K
업데이트 날짜: 2013/4/23

라이선스 보기

Java Heap Cleaner is a MATLAB wrapper for a Java class that cleans up the Java heap from memory leaks, preventing the infamous Java OutOfMemory exception.

The Java code re-initializes some JVM classes responsible for memory leaks, then forcing a garbage collection. Re-initialized Java classes are those used by MATLAB for displaying wievs (command history, current folder etc...).

Installation:

1) Unpack the archive in [PATH_OF_YOUR_CHOICE]
2) Add [PATH_OF_YOUR_CHOICE] to the MATLAB Path
3) Add [PATH_OF_YOUR_CHOICE]\MatlabGarbageCollector.jar to your static MATLAB classpath.txt file (in MATLAB_ROOT/toolboxes/local/classpath.txt)

Usage:

Call jheapcl from within your MATLAB code to prevent Java heap memory from completely filling up. The Java Heap Cleaner is very fast and low resouce consuming.

Please consider that there is no general rule about where/when to call jheapcl, it strongly depends on your code and system. You’re encouraged to experiment to find out the best compromise for your setup.

If you like please rate!

Note:

Thanks to Pete's for the following comment: 
"For people who don't understand step 3, and/or are getting 'Undefined variable "org" or class' errors, navigate to the appropriate directory and run: javaaddpath(which('MatlabGarbageCollector.jar'))"

인용 양식

Davide Tabarelli (2026). Java Heap Cleaner (https://kr.mathworks.com/matlabcentral/fileexchange/36757-java-heap-cleaner), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Performance and Memory에 대해 자세히 알아보기

jheapcl/

버전 게시됨 릴리스 정보
1.11.0.0

Update of instructions

1.6.0.0

Description update

1.1.0.0

Brief description of java code added.

1.0.0.0