🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8383

Memory

#8383
From: Ronald Wildenberg
Date: Wed, 28 Mar 2001 11:48
17 lines
1281 bytes
Hi,

I have a program which uses quite a lot of memory so
I can not use the default maximum heap size.
Instead, I supply the parameter '-Xmx160m' to java,
giving the VM a maximum heap size of 160MB.

Now, when I use 'Runtime.getRuntime().totalMemory()'
it returns 2031616. This is not what I expect for it is
approximately 2MB.

My question is: Have I supplied the wrong parameter
to the JVM or do I not understand the method
totalMemory()?

Thanks,
Ronald.
Technical Details
Message-ID: <3AC1CFA5.E12BF796@tryllian.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!62.58.162.210

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9849fe78e24e781,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-28 04:18:04 PST
Message-ID: <3AC1CFA5.E12BF796@tryllian.com>
Date: Wed, 28 Mar 2001 13:48:53 +0200
From: Ronald Wildenberg <ronald@tryllian.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Memory
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.58.162.210
X-Trace: 28 Mar 2001 03:46:57 -0800, 62.58.162.210
Lines: 19
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!62.58.162.210