I am experiencing intermittent crashes when I use Matlab that appear to be due to memory leaks. These are usually accompanied by java warnings (AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space) concerning available memory. Recently, when Matlab crashed it simultaneously took down Windows (blue screen of death). I have tried increasing the size of the Java heap memory via the preferences option (2012b) and this has helped reduced the frequency of the crashing. However, I am reluctant to leave Matlab running for long periods (>24 hours) on a problem and this is frustrating. To provide a simple example, if I run the function below and check the size of memory occupied by Matlab using task manager before and after execution I find an increase of around 30MB from 195,960K to 225,048K. It does not seem possible to recover this memory without restarting Matlab.
function testFigure
clear all;
for i = 1 : 1000
h = figure;
drawnow;
close(h)
end
clear all;
I am running the version of Matlab below
------------------------------------------------------------------------------------------------ MATLAB Version: 8.0.0.783 (R2012b) MATLAB License Number: **** Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1) Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot™ Client VM mixed mode ------------------------------------------------------------------------------------------------ MATLAB Version 8.0 (R2012b) Simulink Version 8.0 (R2012b) Communications System Toolbox Version 5.3 (R2012b) Control System Toolbox Version 9.4 (R2012b) DSP System Toolbox Version 8.3 (R2012b) Datafeed Toolbox Version 4.4 (R2012b) Embedded Coder Version 6.3 (R2012b) Financial Instruments Toolbox Version 1.0 (R2012b) Financial Toolbox Version 5.0 (R2012b) Fixed-Point Toolbox Version 3.6 (R2012b) Fuzzy Logic Toolbox Version 2.2.16 (R2012b) Image Acquisition Toolbox Version 4.4 (R2012b) Image Processing Toolbox Version 8.1 (R2012b) Instrument Control Toolbox Version 3.2 (R2012b) MATLAB Coder Version 2.3 (R2012b) MATLAB Compiler Version 4.18 (R2012b) Neural Network Toolbox Version 8.0 (R2012b) Optimization Toolbox Version 6.2.1 (R2012b) Partial Differential Equation Toolbox Version 1.1 (R2012b) Signal Processing Toolbox Version 6.18 (R2012b) Simulink Coder Version 8.3 (R2012b) Simulink Control Design Version 3.6 (R2012b) Statistics Toolbox Version 8.1 (R2012b) Symbolic Math Toolbox Version 5.9 (R2012b)
0 Comments
Sign in to comment.