Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Actually, you might want to <em>decrease</em> the Java heap space. The memory in your process, at least in regular Matlab, is split between Matlab and Java. If you increase the Java heap size, you will correspondingly decrease the memory available for Matlab arrays. Matlab arrays live in regular C-style memory, not Java's GCed memory.</p> <p>I'm guessing what's happening is that your Java app, which is loading the javabuilder-built library in, is configured to have a larger Java heap than the Matlab IDE is. Matlab starts out with a smallish Java heap. Here's how to display it from within Matlab.</p> <pre><code>function show_javamemory() rt = java.lang.Runtime.getRuntime(); M = 2^20; disp(sprintf('Java heap: %d M total, %d M max, %d M free',... round(rt.totalMemory()/M), round(rt.maxMemory()/M), round(rt.freeMemory()/M))); </code></pre> <p>In my R2009a, I see this.</p> <pre><code>&gt;&gt; show_javamemory() Java heap: 62 M total, 125 M max, 28 M free </code></pre> <p>That java.opts file in %matlabroot%/bin/win32 controls the JVM that's embedded in Matlab, when it's run as an IDE. I don't think it will affect applications that are loading in your javabuilder-built library. They will need to be adjusted by passing parameters to whatever java command line is invoking them.</p> <p>Try running show_javamemory() from within your compiled app to see what its heap is configured as (and whether your java.opts change had an effect), and then adjusting its Java options to reduce the heap.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload