Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » jvm.dll and Could not reserve enough space for object heap
jvm.dll and Could not reserve enough space for object heap [message #102762] Mon, 10 December 2007 05:27 Go to next message
Eclipse UserFriend
Originally posted by: sergeant72.gmail.com

Hi,

In our RCP it's vital to start jvm in the same process as eclipse.exe, so we used the feature of equinox launcher to specify location of the jvm.dll as -vm property value. It was working fine until we tried to increase maximum size heap to 1100m (-vmargs -Xmx1100m) on a machine with 2GB of Ram. When we try to start it like that, we get a splash screen for a sec and after that we get the dialog "JVM terminated. Exit code=-1....". In console window we see "Error occured during initialization of VM. Could not reserve enough space for object heap."
After trying different things, we finally tried to start java in different process by specifying location of java.exe as -vm parameter to eclipse.exe. In that case we were able to start our app with -Xmx1500m without any problem.
Could somebody, pls, explain to me what's going on and if it's possible to solve that problem. Is that a problem in how eclipse.exe is loadind jvm.dll or jvm.dll is not able to handle such situation?

Same happens with official 3.3 relise as well as with the latest 3.3.1.1.
Any info/advice on how to solve that problem would be appreciated.

Thanks in advance,
Viktor
Re: jvm.dll and Could not reserve enough space for object heap [message #102776 is a reply to message #102762] Tue, 11 December 2007 18:58 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
The bug is here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968

The problem is that the jvm requires a contiguous block of memory. When shared
libraries are loaded by the process, they are placed at their preferred base
address in our memory space. In particular, a windows library COMCTL32.DLL
which we need for graphics (ie splashscreen) has a preferred base address of
0x5D090000 which places it in the middle of the space, which shrinks the largest
block of memory available for -Xmx.

More memory is available when running java.exe because it does not load the same
libraries right away.

Libraries can be loaded at other locations if their preferred address is already
in use, but we don't currently have a way to force this to make more memory
available for -Xmx.

-Andrew

Viktor wrote:
> Hi,
>
> In our RCP it's vital to start jvm in the same process as eclipse.exe, so we used the feature of equinox launcher to specify location of the jvm.dll as -vm property value. It was working fine until we tried to increase maximum size heap to 1100m (-vmargs -Xmx1100m) on a machine with 2GB of Ram. When we try to start it like that, we get a splash screen for a sec and after that we get the dialog "JVM terminated. Exit code=-1....". In console window we see "Error occured during initialization of VM. Could not reserve enough space for object heap."
> After trying different things, we finally tried to start java in different process by specifying location of java.exe as -vm parameter to eclipse.exe. In that case we were able to start our app with -Xmx1500m without any problem.
> Could somebody, pls, explain to me what's going on and if it's possible to solve that problem. Is that a problem in how eclipse.exe is loadind jvm.dll or jvm.dll is not able to handle such situation?
>
> Same happens with official 3.3 relise as well as with the latest 3.3.1.1.
> Any info/advice on how to solve that problem would be appreciated.
>
> Thanks in advance,
> Viktor
Re: jvm.dll and Could not reserve enough space for object heap [message #102797 is a reply to message #102776] Tue, 11 December 2007 22:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sergeant72.gmail.com

Andrew, thank you very much!

This explains everything.

Regards,
Viktor
Re: jvm.dll and Could not reserve enough space for object heap [message #102808 is a reply to message #102776] Wed, 12 December 2007 17:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sergeant72.gmail.com

Hi again,

We spent some time thinking about a way to force loading the libraries at some other memory location and come up with idea, which could be completly stupid, but who knows :). It will involve the modification of the eclipse.exe.
Eclipse.exe before doing anything (like showing the splash) will analyze -Xmx parameter and will try to allocate this memory for itself, after that it will show the splash and just before loading jvm.dll it will reliase previously allocated memory back to the system pool.
Maybe this could work.

Viktor
Re: jvm.dll and Could not reserve enough space for object heap [message #102873 is a reply to message #102808] Thu, 13 December 2007 19:53 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
I have thought of this, but haven't actually tried it. It would require changes
to eclipse.exe so that the graphics libraries are not automatically loaded at
startup (and instead we would load them manually when we need them).
-Andrew

Viktor wrote:
> Hi again,
>
> We spent some time thinking about a way to force loading the libraries at some other memory location and come up with idea, which could be completly stupid, but who knows :). It will involve the modification of the eclipse.exe.
> Eclipse.exe before doing anything (like showing the splash) will analyze -Xmx parameter and will try to allocate this memory for itself, after that it will show the splash and just before loading jvm.dll it will reliase previously allocated memory back to the system pool.
> Maybe this could work.
>
> Viktor
Previous Topic:servlet-mapping to equinoxbridgeservlet
Next Topic:No suitable Log constructor error
Goto Forum:
  


Current Time: Fri Apr 26 13:41:55 GMT 2024

Powered by FUDForum. Page generated in 0.03604 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top