3

The eclipse on my work computer was working with VM argument -Xms40m and -Xmx512m and it is really slow and freezes a lot, I wanted to increase it to -Xmx1024m, but every time I did so I got the error "Could not create the Java Virtual Machine".

The computer has 3.5GB RAM, WIN XP (32-bit), Java 1.6_18

What could be the reason? Is it related to other arguments?

UPDATE: I changed the -vm argument so it will use the jvm.dll that comes with the jrockit JDK and I was able to increase the max heap size to 1024m.

Also, on my home computer (WIN 7, 32-bit, 2GB RAM, java 1.7.0_21-b11), I was able to increase it 1024m as well.

Bennyz
  • 623
  • 2
  • 18
  • 36
  • This is all you need to know: http://stackoverflow.com/questions/316265/tricks-to-speed-up-eclipse – raffian May 26 '13 at 16:11
  • @Raffian, I've seen this question but this doesn't help me since I cannot increase the heap size – Bennyz May 26 '13 at 16:13
  • Could you provide OS & JVM details? I couldn't recall exactly, but there are some limitations with client VM & Server VM – kosa May 26 '13 at 16:17
  • @Nambari, the OS is Windows XP, and what do you mean by JVM details? – Bennyz May 26 '13 at 16:20
  • @Bennyz Which version of the JVM? (ie what does `java -version` display? – Joachim Isaksson May 26 '13 at 16:23
  • @JoachimIsaksson java 1.6 – Bennyz May 26 '13 at 16:25
  • Could you add the whole output of `java -version`? :) – Joachim Isaksson May 26 '13 at 16:25
  • @JoachimIsaksson, it's on my work computer and I'm home right now so I'll be able to do it only tomorrow. Anyway, it's the version that's shipped with Weblogic 10.3.3 without any patches – Bennyz May 26 '13 at 16:30
  • Are you sure you're doing `-Xmx1024m` and not `-Xmx1024`? If you forget the `m` the JVM won't start. – raffian May 26 '13 at 17:06
  • 3
    It's the notorious problem on 32-bit Windows: JVM needs a contiguous memory block for the heap and the address space is often fragmented. You can't do much about it. Get newer Windows :-) – Marko Topolnik May 26 '13 at 17:16
  • @MarkoTopolnik, oh, that's a shame :( We can't migrate to WIN7 at the moment due to some compatibility issues. This issue, it is still present in WIN7 32-bit? – Bennyz May 26 '13 at 17:26
  • @Bennyz Did you read the full contents of that link for tips and tricks to speed up eclipse? Some of those have nothing to do with memory, but still offer great benefit. – raffian May 26 '13 at 17:30
  • I believe so, I doubt they improved the memory layout. – Marko Topolnik May 26 '13 at 18:44
  • Okay, so I checked it today, we're using java 6 update 18. Also, I changed the -vm argument so it will use the jvm.dll that comes with the jrockit JDK and I was able to increase the max heap size to 1024m. – Bennyz May 27 '13 at 17:48

1 Answers1

6

The maximum amount of memory available on Windows 32-bit processes is (generally speaking) 2GB. That includes everything for your JVM, not only the application heap. People report various numbers for the maximum heap that can use for a 32-bit JVM, but 1200m is a common figure. It seems to be lower for you. Best would be to switch to the 64-bit JVM, if you can.

Other questions:

Community
  • 1
  • 1
Iulian Dragos
  • 5,692
  • 23
  • 31