Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » memory allocation problem
memory allocation problem [message #626509] Wed, 22 September 2010 16:01 Go to next message
flpgdt  is currently offline flpgdt Friend
Messages: 4
Registered: September 2010
Junior Member
Hi,

I'm trying to analyse a ~800mb heap dump, which requires a bigger heap than the standard for my eclipse. however, when I go to the eclipse.ini file and set a ``-Xmx2g`` (or ``-Xmx2048m``) I get an error "Failed to create the Java Virtual Machine".

1) yes, I have enough memory. 2) I can change it up to exactly -Xmx976m. 3) I've tried the standalone MAT analyser and it works with -Xmx1024m, not a byte more. 4) No, 1gb is not enough to analyse that heap, I get a OOM

This is the eclipse error:
http://i.imgur.com/NyMLS.jpg

This is the MAT error:
http://i.imgur.com/Y1K1c.jpg

(I reckon they are the same, this is just so you can see an example with MAT)

My current eclipse.ini (working) is:

   -startup
    plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
    -product
    org.eclipse.epp.package.java.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx384m


Anybody figures this out?

thanks!

f.

ps.: `-vmargs -Xmx1g` in the command line wont work either.
Re: memory allocation problem [message #627958 is a reply to message #626509] Thu, 23 September 2010 07:34 Go to previous messageGo to next message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 164
Registered: July 2009
Senior Member
Hi,

The problem is that on a 32bit box (or say it in a 32bit process) on Win the VM can use up to about 2G. But it is not only the Java heap specified with -Xmx that has to fit in these 2g:
- the VM itself needs some space
- some memory is used for loading different dlls
- some for threads (i.e. for the stack of each thread)
- one block is needed for the Perm gen
- there is probably something I've forgotten

For allocating the java heap, i.e. what you specify with -Xmx, the VM need one big piece of the memory. The size of this is limited by the things listed above, and is often further limited by fragmentation caused by some of the loaded dlls.

My experience is that I can usually reserve between 1000 and 1300 Mb on 32bit with Xmx. This seems to be a bit less for you, but I can't tell you the reason.

If your system OS is 64bit, you can try using the Memory Analyzer RCP for win x64.
Otherwise you could try parsing from the command line (ParseHeapDump.bat). This needs a bit less memory (no GUI) and you may be able also able to give it a bit more tha 1G (but may be not).

I hope this helps at least to better understand the problem.

Krum
Re: memory allocation problem [message #628790 is a reply to message #627958] Fri, 24 September 2010 07:44 Go to previous message
flpgdt  is currently offline flpgdt Friend
Messages: 4
Registered: September 2010
Junior Member
Thanks mate!

This explains it...
Previous Topic:Get Heap Dumps From Remote Server
Next Topic:comparing heap dumps?
Goto Forum:
  


Current Time: Thu Apr 25 14:17:16 GMT 2024

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

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

Back to the top