ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Measure memory usage
Date Tue, 05 Apr 2005 07:13:12 GMT
On Tue, 5 Apr 2005, Mikael Petterson <>

> My problem is that I run out of memory when I run my test ( complile
> 1.600 files and run over 5.000 tests).  Is there a way to measure
> how much memory ant is consuming?

You can always ask the Java VM using built-in Java methods (depends on
your JDK, but the free/max/totalMemory methods in Runtime should be
available - I think JDK 1.5 adds more stuff).

> When I run top I get no pointers about memory consumption.

You should.

Probably your tests are leaking memory and you should fork them into a
separate Java VM.  See also Ant 1.6.2's forkmode attribute on <junit>.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message