-mx1024m OK, but -mx2048m not OK

O

opalpa

Using a computer with 4GB ram I can use memory flag upto -mx1024m but
if I increase further I get:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Any insights?

Cheers
Opalinski
(e-mail address removed)
http://www.geocities.com/opalpaweb/
 
T

tom fredriksen

Using a computer with 4GB ram I can use memory flag upto -mx1024m but
if I increase further I get:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Any insights?

I would guess there is a limitation on your system, tmp, swapspace not
big enough, a limit on the memsize of processes on your system or
something similar.

/tom
 
M

Martin Gregorie

Using a computer with 4GB ram I can use memory flag upto -mx1024m but
if I increase further I get:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
-mx is an obsolete option as at SDK 1.4, so use -Xmx instead.

What OS are you using on what hardware?

I think I can guess but I'd like confirmation. If I'm right the answer
to your question is RTFM.
 
M

Mark Thornton

Using a computer with 4GB ram I can use memory flag upto -mx1024m but
if I increase further I get:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Any insights?

Cheers
Opalinski
(e-mail address removed)
http://www.geocities.com/opalpaweb/

The heap requires contiguous address space. It is common on Windows to
have little more than 1GB of contiguous address space available to a
process. This because a variety of DLLs fragment the 2GB address space
available to regular user processes. Some other 32 bit operating systems
will allow a larger heap to be created, otherwise you'll have to go to a
64bit operating system and appropriate JVM.

Mark Thornton
 
T

tom fredriksen

Do you have advice on how to track down the limitation on a windows XP
computer?

Sorry I am a linux guy, but I am sure there is a windows group or forum
you could check with.

/tom
 
O

opalpa

Sorry I am a linux guy

Let me see what happens if I boot with Knoppix live-cd. If it works
out I'm gonna look into Java support on various distros starting with
Debian and the BSDs. Switching questions: do all distros have Java
5.0? Do you recommend a distro for Java 5.0 development?

Cheers
Opalinski
(e-mail address removed)
http://www.geocities.com/opalpaweb/
 
I

iksrazal

(e-mail address removed) opalinski from opalpaweb escreveu:
Let me see what happens if I boot with Knoppix live-cd. If it works
out I'm gonna look into Java support on various distros starting with
Debian and the BSDs. Switching questions: do all distros have Java
5.0? Do you recommend a distro for Java 5.0 development?

Cheers
Opalinski
(e-mail address removed)
http://www.geocities.com/opalpaweb/

I just went thru this recently. On linux you need to issue the ulimit
command. Not sure on a live cd - but you would typically edit
/etc/profile as root such as:

ulimit -s 3072

The end result would be in a typical bash /etc/profile :

if test "$is" != "ash" -a ! -r /etc/initscript; then
#ulimit -c 20000 # only core-files less than 20 MB are
written
#ulimit -d 15000 # max data size of a program is 15 MB
#ulimit -s 15000 # max stack size of a program is 15 MB
#ulimit -m 30000 # max resident set size is 30 MB

ulimit -Sc 0 # don't create core files
ulimit -Sd $(ulimit -Hd)
ulimit -Ss $(ulimit -Hs)
ulimit -Sm $(ulimit -Hm)
# robert raised the memory that a process can take - 3 gigs
ulimit -s 3072
fi

My preference for linux is Suse professional.

HTH,
Robert
http://www.braziloutsource.com/
 
T

tom fredriksen

Let me see what happens if I boot with Knoppix live-cd. If it works
out I'm gonna look into Java support on various distros starting with
Debian and the BSDs.

There are still system limits to consider on linux, though. On a live CD
I dont know what the swap and tmp space are configured to. If you get
into trouble there, you might have to consider installing it get it to
work properly.
Switching questions: do all distros have Java
5.0? Do you recommend a distro for Java 5.0 development?

Not necessarily, but its not difficult to check or upgrade. The only
thing you need to make sure is that the paths are set correctly and you
should be fine. You can even have several version installed at the same
time as long as a shell has the path set correctly for the version you
want to use, and that can be done by a commandline script.

/tom
 
M

Martin Gregorie

Martin said:
-mx is an obsolete option as at SDK 1.4, so use -Xmx instead.

What OS are you using on what hardware?
OK, here's the answer. The Linux manpage for java says that the limit is
2000m on x86 platforms, minus overhead amounts.

This is independent of the OS. You'd better go to 64 bit hardware if you
really
need 2000m or more pool space, but even a SPARC has a 4000m limit.

I'd had a James Snow overdose yesterday: apologies for my previous reply.
 
G

Gordon Beaton

The Linux manpage for java says that the limit is 2000m on x86
platforms, minus overhead amounts.

I believe the default is 3GB userspace (1GB kernel) on Linux/x86, and
I've seen a patch for large ram systems that gets you a 4GB userspace
(4GB kernel).

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top