Changes between Version 4 and Version 5 of Doc/compiler/running


Ignore:
Timestamp:
Mar 7, 2007, 2:57:45 PM (17 years ago)
Author:
/O=GRID-FR/C=FR/O=CNRS/OU=LAL/CN=Charles Loomis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/compiler/running

    v4 v5  
    4545== Adjusting the Java Virtual Machine Memory ==
    4646
     47The performance of the compiler can degrade markedly if there is not sufficient memory to do a particular compile and build.  The mechanism for increasing the available memory differs depending on how the compiler in invoked.
     48
     49== Direct Invocation via Java ==
     50
     51If the java compiler class is being directly invoked via the {{{java}}} command, then the option "-Xmx" must be added.  For example to start java with 1024 MB, the following command and options can be used:
     52{{{
     53java -Xmx1024M org.quattor.pan.Compiler [options...]
     54}}}
     55For the panc command, currently the panc script must be edited to add this option.
     56
     57== Direct Invocation via Ant ==
     58
     59If the compiler is invoked via the panc ant task, then the memory option can be added with the ANT_OPTS environmental variable.
     60{{{
     61export ANT_OPTS="-Xmx1024M"
     62}}}
     63or
     64{{{
     65setenv ANT_OPTS "-Xmx1024M"
     66}}}
     67depending on whether you use an "sh"- or "csh"-type shell.
     68
     69== Invocation via Eclipse ==
     70
     71If you use the default VM to run the panc ant task, then you will need to increase the memory when starting eclipse.  From the command line you can add the VM arguments like:
     72{{{
     73eclipse -vmargs -Xmx<memory size>
     74}}}
     75You may also need to increase the memory in the "permanent" generation for a Sun VM with
     76{{{
     77eclipse -vmargs -XX:MaxPermSize=<memory size>
     78}}}
     79This will increase the memory available to eclipse and to all tasks using the default virtual machine.  For Max OS X, you will have to edit the application "ini" file.  See the  [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm eclipse instructions] for how to do this.
     80
     81If you invoke a new java virtual machine for each build, then you can change the ant arguments via the run parameters.  From within the "ant" view, right-click on the appropriate ant build file, and then select "Run As -> Ant Build...".  In the pop-up window, select the JRE tab.  In the "VM arguments" panel, add the "-Xmx<memory size>" option without the quotes.  (You can also add other options here.)  The next build will use these options.