Main Content

Java Memory Usage

MATLAB® Report Generator™ uses Java heap memory to generate PDF documents. The default Java heap size that MATLAB allocates may not be enough to convert large PDF documents. The error that occurs if your report conversion runs out of Java heap memory is:

Document conversion failed. Java exception occurred: 
java.lang.OutOfMemoryError

To generate your PDF document, increase the Java heap space to the maximum amount:

  1. Click Settings on the MATLAB toolbar.

  2. Expand General

  3. To open the MATLAB General Java Runtime Environment Settings panel, click Java Runtime Environment

    The Java Heap size slider is positioned at 1768 MB.

  4. Move the slider all the way to the right to set the Java Heap Size to the maximum value.

  5. To enable the new Java heap size, restart MATLAB.