ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lefevre" <eric.lefe...@valtech.co.uk>
Subject [PATCH] forking javac with specified memory settings (take 2)
Date Thu, 23 Aug 2001 13:03:36 GMT
OK, I have corrected the DefaultCompilerAdapter.java file by adding a
test for Java 1.1.
For Java 1.1, the parameters for javac will be of the form: "-J-ms64m",
while for Java 1.2 and higher, they will be: "-J-Xms64m". I cannot
really test this on my machine, so I'll trust the documentation.

As far as I can tell, the files should be ready to check in.

Eric

> -----Original Message-----
> From: Eric Lefevre [mailto:eric.lefevre@valtech.co.uk]
> Sent: 22 August 2001 23:27
> To: ant-dev@jakarta.apache.org
> Subject: [PATCH] forking javac with specified memory settings
>
>
> Please find attached the updated files containing the new
> memoryInitialSize and memoryMaximumSize attributes for the
> <javac> task.
>
> Changes in Javac.java:
> ----------------------
> line 118, added
>     private String memoryInitialSize;
>     private String memoryMaximumSize;
> line 183, added
>     /**
>      * Set the memoryInitialSize flag.
>      */
>     public void setMemoryInitialSize(String memoryInitialSize) {
>         this.memoryInitialSize = memoryInitialSize;
>     }
>
>     /** Gets the memoryInitialSize flag. */
>     public String getMemoryInitialSize() {
>         return memoryInitialSize;
>     }
>
>     /**
>      * Set the memoryMaximumSize flag.
>      */
>     public void setMemoryMaximumSize(String memoryMaximumSize) {
>         this.memoryMaximumSize = memoryMaximumSize;
>     }
>
>     /** Gets the memoryMaximumSize flag. */
>     public String getMemoryMaximumSize() {
>         return memoryMaximumSize;
>     }
>
> Changes in DefaultCompilerAdapter.java:
> ---------------------------------------
> line 94, added
>     protected String memoryInitialSize;
>     protected String memoryMaximumSize;
> line 24, added
>         memoryInitialSize = attributes.getMemoryInitialSize();
>         memoryMaximumSize = attributes.getMemoryMaximumSize();
> line 90, added
>         if (memoryInitialSize != null) {
>             cmd.createArgument().setValue("-J-Xms"+memoryInitialSize);
>         }
>
>         if (memoryMaximumSize != null) {
>             cmd.createArgument().setValue("-J-Xmx"+memoryMaximumSize);
>         }
>
> Changes in javac.html:
> ----------------------
> line 198, add
>     <td valign="top">memoryInitialSize</td>
>     <td valign="top">the initial size of the memory for the underlying
> VM, if javac is run
>     externally, ignored otherwise; defaults to the standard VM memory
> setting.
>     (examples: <code>83886080</code>, <code>81920k</code>, or
> <code>80m</code>)</td>
>     <td align="center" valign="top">No</td>
>   </tr>
>   <tr>
>     <td valign="top">memoryMaximumSize</td>
>     <td valign="top">the maximum size of the memory for the underlying
> VM, if javac is run
>     externally, ignored otherwise; defaults to the standard VM memory
> setting.
>     (examples: <code>83886080</code>, <code>81920k</code>, or
> <code>80m</code>)</td>
>     <td align="center" valign="top">No</td>
>   </tr>
>   <tr>
>
>

Mime
View raw message