Jar Files and memory footprint...
Maxim Kizub
max at immsp.kiev.ua
Fri Jan 8 22:14:30 PST 1999
Hello.
Godmar, this may be the reason of enormouse
memory usage for kiev compiler too, isn't it?
We've fixed one memory leaking bug with zip files,
and I get 50% of memory usage decrease.
There may be another memory leak bug somewere
there. Remember my statistic - it was
50-60 Mb for kaffe before bugfix and about 35 Mb
after, while Sun spends only 8 Mb. I expect kaffe
to spend not more 10-12 Mb normally, so, there
must be another bug like that fixed one.
Is there a way to find it? Maybe, adding an additional
"debug" argument to gc_malloc and gc_free. I.e. something like
#if MEMORY_PROFILE
#define gc_malloc(id,size) ...
#else
#define gc_malloc(id,size) gc_malloc_internal(size)
#endif
And watch the profile for allocated but not freed points,
I mean, first argument is to be unique ID for each gc_malloc
point.
This may help in finding current memory leaks, and will
prevent them in future.
>
>The kaffe version is todays -snap.
>
>Curious about Kaffe's memory foot print when using jar files vs using
>unpacked Klasses.jar and classes.zip
>
>This is a "ps" of small test program not using Klasses.jar nor
>classes.zip rather the classes having been unpacked to a directory:
>
>./java.nojar -verbosemem -ms 500k -mx 1M -as 100K Test foo > & dump
> PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
>61149 root 64 0 2468K 1632K RUN 0:07 85.56% 25.29% Kaffe
>
>PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
>61165 root 80 0 14248K 8592K RUN 0:10 91.62% 36.08% Kaffe
>
>
>This is the dummy test program:
>
>import java.lang.Long.*;
>import java.net.URL;
>import java.net.MalformedURLException;
>import java.lang.System;
>
>public class Test {
> public static void main (String args[]) {
> URL home = null;
> while ( true ) {
> try {
> home = new URL(args[0]);
> } catch (MalformedURLException ex) {
> System.out.println("try again" + ex);
> }
> System.gc();
>
> }
> }
>}
>
> Tnks,
> Amancio
>
>
>
More information about the kaffe
mailing list