Article View: borland.public.jbuilder.java.api
Article #2597Re: Why Java Program eats Memory?!
From: Rich Wilkman
Date: Mon, 25 Sep 2000 00:00
Date: Mon, 25 Sep 2000 00:00
63 lines
2754 bytes
2754 bytes
Nope, and when it's all working right you really don't need to care about items waiting to be gc'd. You can't get to them accidentally or anything like that. It's much better for Windows folks in JDK 1.3 and it always seemed better in the *nix releases. -Rich Captain Claw wrote: > Is there any other way to initate garbage collection instantly or at a > sheduled time ? > > Rich Wilkman wrote: > > > 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:
<39CF880B.6C92AD2F@formlessvoid.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39c28555$1_2@dnews> <39C2AAC4.67612EAF@formlessvoid.com> <39C3031B.DA79268B@yahoo.com> <39C649F1.60C089EB@formlessvoid.com> <39C70681.970D85F9@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/25 Message-ID: <39CF880B.6C92AD2F@formlessvoid.com> X-Deja-AN: 673946703 Content-Transfer-Encoding: 7bit References: <39c28555$1_2@dnews> <39C2AAC4.67612EAF@formlessvoid.com> <39C3031B.DA79268B@yahoo.com> <39C649F1.60C089EB@formlessvoid.com> <39C70681.970D85F9@yahoo.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 25 Sep 2000 10:07:30 -0800, 209.144.169.10 MIME-Version: 1.0 Reply-To: richw@formlessvoid.com Newsgroups: borland.public.jbuilder.java.api