Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 15688 invoked from network); 5 Nov 2002 21:21:41 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Nov 2002 21:21:41 -0000 Received: (qmail 29909 invoked by uid 97); 5 Nov 2002 21:22:26 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 29833 invoked by uid 97); 5 Nov 2002 21:22:24 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 29746 invoked by uid 98); 5 Nov 2002 21:22:22 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3DC8369D.9040902@yahoo.de> Date: Tue, 05 Nov 2002 22:22:37 +0100 From: "J.Pietschmann" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: ant.system.gc()? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N David McTavish wrote: > Is there anyway to tell ant to run the garbage collection? I have a fairly > complicated build script that must execute peer projects so that it can > properly import the dependent libraries. What is happening, is that every > peer build process that is called stays in memory until the entire build > process is complete. This results in an ever-increasing JVM, until the point > that the JVM throws an OutOfMemoryError. (This is occuring at about 80MB). I > COULD set the upper limit higher, but it seems a little ridiculous that ant > takes 80 MB to compile the source. > > any ideas? You misunderstood garbage collections. Explicit gc() is of no help in such situations, because gc happens anyway if available memory is low. An OutOfMemoryError happens if there is really no memory to reclaim and the limit is reached. Actually, Ant takes quite a bit of memory to read huge source trees, and there are issues with certain Ant tasks (for example antcall) which could be considered memory leaks. The only solution is to increase the JVM memory settings and/or wait until the memory leaks are confirmed and fixed. J.Pietschmann -- To unsubscribe, e-mail: For additional commands, e-mail: