X-Received: by 10.66.77.231 with SMTP id v7mr29695paw.35.1355787496931; Mon, 17 Dec 2012 15:38:16 -0800 (PST) Received: by 10.50.5.174 with SMTP id t14mr127080igt.11.1355787496871; Mon, 17 Dec 2012 15:38:16 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!newsfeed.news.ucla.edu!usenet.stanford.edu!kt20no10065440pbb.1!news-out.google.com!6ni50351pbd.1!nntp.google.com!kt20no10065437pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Mon, 17 Dec 2012 15:38:16 -0800 (PST) In-Reply-To: <50cf9ebd$0$281$14726298@news.sunsite.dk> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 69.28.149.29 References: <7f80256a-03d0-4ecd-b20f-164547e4f573@googlegroups.com> <50ce8cd7$0$287$14726298@news.sunsite.dk> <50cf9ebd$0$281$14726298@news.sunsite.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <69b7ccde-6a63-452b-a14d-38e7eef0804d@googlegroups.com> Subject: Re: 32G ram From: Lew Injection-Date: Mon, 17 Dec 2012 23:38:16 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.java.programmer:20401 Arne Vajh=F8j wrote: > Donkey Hottie wrote: >> Arne Vajh=F8j kirjoitti: >>> mcheung63 wrote: >>>> i [sic] got 32GB ram, why i [sic] can't -Xmx2G, it got an error "= Could not >>>> create the Java Virtual Machine" Because you allocated all the available memory to the heap, and none to the= JVM or class space, stack, ... . How much RAM you have is irrelevant; it's how much RAM you are allowed to a= llocate=20 per process with a 32-bit Java. Assuming the other posters are correct and you're using a 32-bit system. Ar= e you? That might have been good to tell us in the beginning. >>>> /root>free -m >>>> total used free shared buffers >>>> cached >>>> Mem: 32387 16973 15413 0 243 11= 906 >>>> -/+ buffers/cache: 4823 27563 >>>> Swap: 1906 0 1906 >>>> /root>uname -a >>>> Linux localhost.localdomain 3.6.9-2.fc17.i686.PAE #1 SMP Tue Dec 4 >>>> 14:15:28 UTC 2012 i686 i686 i386 GNU/Linux >>> >>> 32 bit or 64 bit Java? >=20 >> Apparently 32 bit, as the i686 OS is 32 bit PAE too. >=20 > Then that explains it. >=20 > 32 bit Java on x86 usually only allows for around 1.7 GB > of heap space. Bear in mind, OP, that "2 GB" is the maximum allocation for the *entire pro= cess*, not=20 just the heap. If you allocate the whole amount for heap, that leaves nothi= ng for stack=20 or the interpreter. That's why it fails. So the 1.7 GB or so is all you can get and still leave room for Java itself= . But why, pray tell, are you using a 32-bit system? --=20 Lew