Cougaar Mac OS X

Todd Wright twright at bbn.com
Wed Mar 5 18:56:19 EST 2008


Dimitrios Traskas wrote:
> Hi there
> 
> thanks for the replies. I have tried to set the  <vm_parameter> 
> -Xmx1024m </vm_parameter> in my society.xml file within my project and 
> no luck. I also modified the configuration file of Netbeans to increase 
> the Java heap space to 1GB and no luck with that either.

Are you sure this value is being passed to the JVM?

Try adding this to your test plugin:
   System.out.println("Max heap size: "+Runtime.getRuntime().maxMemory());

I tested this on my Linux box.  With no "-Xmx" it prints:
   Max heap size: 66650112      (64mb)
With "-Xmx1024m" it prints:
   Max heap size: 1065484288    (1016mb)

> I then looked
> at the parameters in SimpleAgent.xsl and I could not understand what I 
> need to change there.

You shouldn't need to edit that file.  There are some -D flags you could set, 
but that should not be necessary.  For details, see:
   http://cougaar.cougaar.org/software/latest/OnlineManual/Templates.html

> Is there an example that I can use, apart from the
> code examples in ping and mesh tutorials?

No, I think your simple example is the right place to start.

I think that the -Xmx value is not being passed to the JVM, as noted above.

> 
> Sorry for the repeated questions but I do need to get to the bottom of 
> this. Do you think there might be a problem with using Netbeans and the 
> Idistro module instead of Eclipse?

I don't know how that IDE passes the -D and -X flags to the JVM.

You might want to try running your example from the command line.

Todd

> 
> 
> Thanks
> Dimitri



More information about the Cougaar-developers mailing list