error: out of memory or dimension too large for Octave's index type
According to the official docs, I need to add a line like -Xmx2048m
to file java.opts
.
"The directory where the Java options file is located is specified by the environment variable OCTAVE_JAVA_DIR."
I don't have an environment variable with that name.
If unset the directory where javaclasspath.m resides is used instead (typically OCTAVE_HOME/share/octave/OCTAVE_VERSION/m/java/). You can find this directory by executing
which javaclasspath
That command doesn't work either (returns "which: no javaclasspath in ...")
I found what looks like the correct directory, but it doesn't have a file called java.opts
. I created the file and added that line to it, but I'm still running into the same memory limitation error. I confirmed that the issue is not related to "dimension too large" and I restarted Octave several times.
How can I increase the memory limit in Octave?