OpenOffice and gcj at runtime
Tue Dec 14 23:54:00 GMT 2004
Tom Tromey wrote:
>So when we get to the call that hangs, we see that the method index is
>"1". But this points to some other method in the vtable -- since in
>this case the index is really an interface table index, not a vtable
>I agree that this fix is just a band-aid for 4.0.
>Retro-fitting the declaring class into the jmethodID is somewhat ugly,
>since it means more memory use (another pointer per method) just for
>this one obscure case.
Yeah. Unfortunately I don't see a way to make JNI interface calls
efficient without having the pointer, but perhaps such calls are rare
enough that we can ignore them (the small number of complaints about
this bug suggests this might be true). But, note that there are some
other cases where it would make things easier if we had this pointer.
When we have fully converted to the BC-ABI, the extra memory will be
less of a concern because the jmethodIDs will be allocated at runtime,
and only methods from initialized/linked classes will occupy memory.
Since they are currently taking up space in binaries, size is much more
of a concern.
In the short term, perhaps adding another hidden method modifier/flag
would be the best fix.
More information about the Java