Jochen Hoenicke wrote:

> Also it seems impossible to
> use a copying or generational garbage collection with CNI, since the
> native code may directly modify objects.  CNI is not even compatible
> against binary compatible class evolution.

Not true. libgcj's collector *is* generational, and there's no reason why it
couldn't be made copying as well if there is going to be a performance
benefit in doing so (in fact, Hans Boehm's latest code includes incomplete
support for a copying "nursury" for young objects).

Why would the ability to manipulate objects at a lower level through CNI have
any effect on the collector? It is true that a pointer to *inside* an object
could confuse the collector into falsely thinking an object can be reclaimed,
but that would require pointer arithmetic which is not allowed by Standard
C++ anyway.

What exactly do you mean by "compatible against binary compatible class
evolution"?

regards

  [ bryce ]

Reply via email to