Hi Mikael, You can fork the big memory eaters (f.e. <javac/> with your 1600 sourcefiles or maybe <javadoc/>). Then You can set up your main ant-process with just a small amount of memory (xms and xmx) And give the forked processes as much as they need.
Kind Regards Rainer > -----Original Message----- > From: Mikael Petterson (KI/EAB) > [mailto:[EMAIL PROTECTED] > Sent: Friday, April 01, 2005 8:58 AM > To: [email protected] > Subject: A memory problem in ant or build.xml > > > Hi, > > I am running Apache Ant version 1.6.2 compiled on July 16 > 2004 on Solaris 8. I have about 1600 source files that I build. > > I used ANT_OPTS="-Xms256m -Xmx512m";export ANT_OPTS > to execute my build file. ( Is there a way to check that ant > use this env. variable?). Then I get > 'java.lang.OutOfMemoryError' I increase the heap ( start and > max) to: ANT_OPTS="-Xms512m -Xmx768m";export ANT_OPTS And I > don't get the error. Everything is fine.....or... > > Well as a programmer I want to make sure that we use the > resources as efficient as possible. Can I optimize my > build.xml to consume as litte with resources as possible? > How? Is it ' a known problem' that ant 1.6.2 consumes a lot > of memory? > Does it matter which jvm I start ant in? ( I am using 1.4.2_02 ) > > All hints are very much appreciated. > > //Mikael > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
