Article View: borland.public.jbuilder.java.api
Article #2580Re: Why Java Program eats Memory?!
From: Rich Wilkman
Date: Mon, 18 Sep 2000 00:00
Date: Mon, 18 Sep 2000 00:00
48 lines
2076 bytes
2076 bytes
System.gc() doesn't call the garbage collector. It's a request that may be, at some point in the near to distant future be considered for possibly convincing the garbage collector to fire if it wants to. -Rich Captain Claw wrote: > Try giving System.gc() ocassionally to invoke the garbage collector > > > Rich Wilkman wrote: > >> Xuegang Ban: >> >> Is it being 'eaten' or is it just null and waiting for the garbage >> collector to >> come get it? Just using the system tools in NT won't tell you much >> that you >> need to diagnose this. To me, it sounds like each loop does 5M >> worth of work >> with no object re-use. If the garbage collector can fire before you >> run out of >> memory, you'll get back the dead references. Your NT monitors, >> however, won't >> show you that; it'll just show you the total heap size. >> >> -Rich >> >> banxuegang wrote: >> >> > Hi, >> > I used Thread class in my Java Application. There is a loop in it. >> But, I >> > found that every time this loop execuates, the system memory is >> eaten by 5 >> > MB. What's the problem? I think there are should not Memory >> problems in Java >> > Programming. But.... >> > Thanks. >> > >> > -- >> > Xuegang Ban >> > Civil&Enviromental Engineering Department, >> > Univ. of Wisconsin-Madison >> > Email: ban@cae.wisc.edu >> > Phone: 608-262-3967(o) >> > 608-260-9123(h) >
Technical Details
Message-ID:
<39C649F1.60C089EB@formlessvoid.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39c28555$1_2@dnews> <39C2AAC4.67612EAF@formlessvoid.com> <39C3031B.DA79268B@yahoo.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,80c63c7225823056 X-Google-Attributes: gid1089d0,public From: Rich Wilkman <richw@formlessvoid.com> Subject: Re: Why Java Program eats Memory?! Date: 2000/09/18 Message-ID: <39C649F1.60C089EB@formlessvoid.com> X-Deja-AN: 671267362 Content-Transfer-Encoding: 7bit References: <39c28555$1_2@dnews> <39C2AAC4.67612EAF@formlessvoid.com> <39C3031B.DA79268B@yahoo.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 18 Sep 2000 09:52:13 -0800, 209.144.169.10 MIME-Version: 1.0 Reply-To: richw@formlessvoid.com Newsgroups: borland.public.jbuilder.java.api