ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Robinson <>
Subject RE: Out of memory issues when compiling
Date Sat, 10 Aug 2002 15:15:20 GMT

>I'm getting the same "out of memory error" as described below on compiles, 
>but when I tried
>            fork="yes"
>            memoryInitialSize="128m"
>            memoryMaximumSize="512m"
>I got the message:
>         Class doesn't support the 
> "fork" attribute
>then when I took out the fork attribute I got:
>         Class doesn't support the 
> "memoryinitialsize" attribute when I got rid of the fork line
>Any obvious clues on how to overcome this?
>Seems like you covered most bases...
>I'd try with:
><javac fork="yes"
>        memoryInitialSize="512m"
>        memoryMaximumSize="1024m">
>   ...
>since you have 1GB RAM. We compile with mostly 2 <javac>, one with 1400
>classes and the other with 1800 classes with the settings above, and we used
>to compile it in one pass only. We're now trying to move away from such a
>monolithic architecture, and have refactored quite a bit to better define
>more independent layers that can be compiled independently (in the right
>order). Using precompiled layers that the currently compiled layer depends
>on makes compilation lighter on the memory side, and development easier
>overall (separating the layers into there own sub-project).
>The challenge is to go from a monolithic to a layered architecture... --DD
>-----Original Message-----
>From: Ed Mangual []
>Sent: Tuesday, July 30, 2002 3:46 PM
>To: ''
>Subject: Out of memory issues when compiling
>I am compiling a fairly large project containing anywhere from 1500 to 2500
>source files and I am constantly getting the compiler has ran out memory
>error. I have tried using the "set ANT_OPTS=-Xmx512m" in the ant batch file,
>forking the javac processes and even setting the memoryInitialSize and
>memoryMaximumSize, but nothing seems to work. I am compiling on a dual 1gig
>xeon on win2k, Ant-1.4.1, sun jdk 1.2.2_12 and with 1GB of memory. I run
>into the same problem using Ant 1.5. I have watched the java process used by
>Ant and it seems to grow with each task it executes with out releasing the
>memory, it looks to me that when I forked the process it helped some but I
>still see the errors. Any ideas? Do we have some type of memory leak?
>Ed Mangual

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

View raw message