|
From: Leif M. <le...@ta...> - 2003-02-08 16:42:44
|
Sal,
I ran a few tests with the following class:
---
public class Memory
{
public static void main(String[] args)
{
Runtime runtime = Runtime.getRuntime();
System.out.println( "Total Memory: " + runtime.totalMemory() );
System.out.println( "Memory: " + ( runtime.totalMemory() -
runtime.freeMemory() ) );
}
}
---
As a standalone java app, I get the following output:
Total Memory: 2031616
Memory: 252440
So the JVM allocates 2MB but is only using 252Kb
Running from with the wrapper using the WrapperSimpleApp and an initial
memory setting of 1MB, I get the following:
Total Memory: 8323072
Memory: 549272
Looking at the debug output of the JVM being launched, I saw that the
initial memory
was still set to 8MB even though it was set to 1MB in the config file.
I am not sure why I had set the minimum to 8MB, but it is now changed to
1MB.
This will be in the next release.
Note that the values returned above are actually smaller than what is
actually allocated
by the system. Running with the Wrapper is still a few hundred KB
larger than without.
This is most likely due to the extra jars, classes, native library and
the socket resources
used to communicate with the Wrapper. I is much better than before though.
Thanks for catching this.
Cheers,
Leif
Sal Ingrilli wrote:
>I run my program with the following configurations, and here is what
>Runtime.freeMemory ()/totalMemory () return:
>Stand-alone: 1Mb/2Mb
>Wrapper w/WrapperSimpleApp: 15Mb/16Mb
>Wrapper w/WrapperSimpleApp & wrapper.java.initmemory=2: 7Mb/8Mb
>
>Any suggestions on how to get back a memory footprint as small as my
>standalone version?
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|