Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Could not reserve enough space for object heap

Subject: Could not reserve enough space for object heap

From: Ray Zhao

Date: 1 Feb, 2010 16:35:25

Message: 1 of 2

I got the following error when I try to create a Matlab object in Excel.

------------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Stack Trace:
  [0] jmi.dll:void __stdcall mwJavaAbort(void)(0x78f95578 "Could not reserve enough space f..", 0, 0x78dd0000, 0x1d8014e0) + 21 bytes

------------------------------------------------------------------------
        Fatal Java Exception detected at Fri Jan 29 11:18:53 2010
------------------------------------------------------------------------

Configuration:
  MATLAB Version: 7.5.0.342 (R2007b)
  MATLAB License: unknown
  Operating System: Microsoft Windows XP
  Window System: Version 5.1 (Build 2600: Service Pack 3)
  Processor ID: x86 Family 6 Model 7 Stepping 10, GenuineIntel
  Virtual Machine: Java is not enabled
  Default Charset: windows-1252

Java is not enabled
------------------------------

I tried to add an environmental variable - MATLAB_RESERVE_LO=0 as suggested by some other posts. But it doesn't work. And it seems I can't compile the library with no JVM option as the "Disable JVM at runtime" option in the deploytool is disabled.

Any ideas?

Thanks in advance,
Ray

Subject: Could not reserve enough space for object heap

From: Yair Altman

Date: 1 Feb, 2010 22:08:08

Message: 2 of 2

"Ray Zhao" <wpzhao@statestreet.com> wrote in message <hk6vsd$irr$1@fred.mathworks.com>...
> I got the following error when I try to create a Matlab object in Excel.
>
> ------------------------
> Error occurred during initialization of VM
> Could not reserve enough space for object heap
> Stack Trace:
> [0] jmi.dll:void __stdcall mwJavaAbort(void)(0x78f95578 "Could not reserve enough space f..", 0, 0x78dd0000, 0x1d8014e0) + 21 bytes
>
> ------------------------------------------------------------------------
> Fatal Java Exception detected at Fri Jan 29 11:18:53 2010
> ------------------------------------------------------------------------
>
> Configuration:
> MATLAB Version: 7.5.0.342 (R2007b)
> MATLAB License: unknown
> Operating System: Microsoft Windows XP
> Window System: Version 5.1 (Build 2600: Service Pack 3)
> Processor ID: x86 Family 6 Model 7 Stepping 10, GenuineIntel
> Virtual Machine: Java is not enabled
> Default Charset: windows-1252
>
> Java is not enabled
> ------------------------------
>
> I tried to add an environmental variable - MATLAB_RESERVE_LO=0 as suggested by some other posts. But it doesn't work. And it seems I can't compile the library with no JVM option as the "Disable JVM at runtime" option in the deploytool is disabled.
>
> Any ideas?
>
> Thanks in advance,
> Ray

Either you have too many active memory-gobbling processes (kill some of them and retry), or your memory is extremely fragmented (in which case restarting your system might help). As an alternative, you can try and modify the startup JVM heap size as explained here: http://www.mathworks.com/support/solutions/en/data/1-18I2C/

Yair Altman
http://UndocumentedMatlab.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us