Enhancement Request
Jeff Sturm
jsturm@one-point.com
Thu Jan 2 03:15:00 GMT 2003
On 2002年12月31日, Glenn Chambers wrote:
> My problem with this strategy is that I find it hard to see how linking
> two distinct versions of 'libgc' will be able to work. Even assuming the
> code issues work out, there's still the fact that there will be two gc'd
> memory pools running in parallel, resulting in memory wastage. There's
> also the mildly interesting question of whether GC-A will scan GC-B's
> pool looking for live pointers into GC-A's pool of objects.
Can you simply link your Portable.NET application to libgcj.so instead of
libgc.a/libffi.a?
> Upon further review, it seems that unless libffi has a bunch of global
> data structures (I haven't looked), that having two distinct
> implementations
> in the same application is unlikely to cause major problems. The issue
> is the same as libgc - if Portable.NET links statically against libffi.1
> and loads libgcj.so, which contains a libffi.2 (statically linked), then
> what happens to any globals from libffi? If they're distinct, then
> things (should) work; if one overrides the other, then I'm doomed.
In an ELF executable, the first occurrence of a global symbol generally
overrides any other (unless a DSO is built with -Bsymbolic). For libffi
that isn't necesssarily fatal... the first one should be shared by pnet
and libgcj, the second one just wastes space.
Jeff
More information about the Java
mailing list