[kaffe] Compare kaffe and IBMJava2-131 Java Virtual Machine.

Dalibor Topic robilad at yahoo.com
Tue Mar 11 00:24:01 PST 2003

hi Greg,

--- Greg Wooledge <greg at wooledge.org> wrote:
> Dalibor Topic (robilad at yahoo.com) wrote:

> I started up Freenet with those switches (without my
> normal -mx 224M)
> and then beat upon it vigorously with local
> requests.

thanks for the data. I've looked through it, and there
is a ton of java.lang.Objects, followed by
HashMap.Entrys, with freenet/fs/dir/NativeFSDirectory
following way behind it. Freenet seems to use Objects
mostly for synchronization purposes, but I haven't
found out what all these HashMap.Entries are for.

So I wrote a small test program that counts stack
traces, attached.

Could you inject the ObjectCounter code into the
java.util.HashMap class, add a call to it in the
HashMap Entry constructor and add a call to print out
the trace cache in Runtime.exit()? I am really
interested who is allocating all these little things

I could also provide you with a patch tonight, if
that's easier for you.

> You may notice that at one point, an
> OutOfMemoryError is also printed.
> This appears to have come from Freenet's stderr:
> java.lang.OutOfMemoryError
>         at
> I don't know whether it's relevant.

Couldn't say, I haven't looked extensively at
freenet's source code. I've seen that Freenet uses a
lot of its own collections types, so I'm not sure
where kaffe is leaking the memory. I'd suspect some
collection class leaves HashMap.Entries around linked
to by an iterator or something like that.

dalibor topic

Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GCTest.java
Type: application/octet-stream
Size: 1208 bytes
Desc: GCTest.java
Url : http://kaffe.org/pipermail/kaffe/attachments/20030311/e8a32154/attachment-0003.obj 

More information about the kaffe mailing list