Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use all available memory?

5 views
Skip to first unread message

Sébastien Paquet

unread,
Nov 18, 2003, 2:18:27 PM11/18/03
to
I would like to know how I could use all available memory for one process in
Java?

I know about the -Xmx option, but it doesn't accept a value greater than
1800M. I have a computer with 4GB of RAM and I would like my program to be
able to use it all.

I would really appreciate if someone can tell me how to use all available
memory.

Thanks

Sébastien Paquet


xarax

unread,
Nov 18, 2003, 2:23:54 PM11/18/03
to
"Sébastien Paquet" <spa...@damas.ift.ulaval.ca> wrote in message
news:7guub.39567$Ng3....@charlie.risq.qc.ca...

Sun JVM 1.4.2 accepts -Xmx and -Xms in gigabyte increments.

Try -Xmx2g -Xms2g

Steve W. Jackson

unread,
Nov 18, 2003, 2:25:00 PM11/18/03
to
In article <7guub.39567$Ng3....@charlie.risq.qc.ca>,
"Sébastien Paquet" <spa...@damas.ift.ulaval.ca> wrote:

>:I would like to know how I could use all available memory for one process in

>:
>:

Since the JVM has a closed heap with a maximum heap size (which isn't
uniform on all platforms), your only other options seem to be other
languages or using multiple Java processes that jointly consume the
memory and communicate with each other (sockets, RMI, something like
that).

= Steve =
--
Steve W. Jackson
Montgomery, Alabama

Steve W. Jackson

unread,
Nov 18, 2003, 5:54:14 PM11/18/03
to
In article <eluub.5971$n56....@newsread1.news.pas.earthlink.net>,
"xarax" <xa...@email.com> wrote:

>:"Sébastien Paquet" <spa...@damas.ift.ulaval.ca> wrote in message

That's true, but it still doesn't work the same on all platforms. For
instance, on my XP box, 2g won't work. Neither will 1800m. The largest
value it will take is 1578m. But on Solaris, we were able to use a much
larger value.

Michael Holtermann

unread,
Nov 19, 2003, 5:22:25 AM11/19/03
to
Hi!

Am Tue, 18 Nov 2003 19:18:27 GMT schrieb Sébastien Paquet:

> 1800M. I have a computer with 4GB of RAM and I would like my program to be
> able to use it all.

Please, excuse my question, but what kind of application needs 4 GB of RAM?

Thanks, Michael.

nos

unread,
Nov 19, 2003, 1:32:39 PM11/19/03
to
in core data base is one example

"Michael Holtermann" <spamn...@gmx.de> wrote in message
news:1l1e2ohnjlv1s.1...@40tude.net...

Brad BARCLAY

unread,
Nov 20, 2003, 1:09:55 AM11/20/03
to

Note that your OS may not allow a single process to be able to address
more than a fixed amount of physical memory -- many OS's put a 2GB limit
on the amount of memory that a single process can address.

If you're running an OS where this is the case, than there isn't
anything you're going to be able to do about it from Java.

Brad BARCLAY

--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org

0 new messages