ObjC configured --with-objc-gc needs external Boehm gc

Helge Hess helge.hess@skyrix.com
Wed Jan 17 03:13:00 GMT 2001


Matthias Klose wrote:
> Boehm, Hans writes:
>  > The question is really whether the last pointer to an object can point to
>  > the inside of the object.  If you can get and save a pointer to a field in
>  > object A, save it inside object B, and then drop the pointer to A, you need
>  > ALL_INTERIOR_POINTERS.  Thus C/C++ more or less need it, while Java doesn't.
>  > If you can embed C structs inside Objective C objects, I suspect Objective C
>  > also needs it?
> 
> Then ObjC needs it as well.

I do not agree. It is theoretically possible, but irrelevant in practice
(it plays in the same league like ORing a ptr).

It doesn't make sense to hold *only* a ptr into the inside, since if you
don't have the ptr to the block-start, you can't reach 'isa' and
therefore this object isn't an ObjC object anymore.
Not storing a block-ptr is actually also problematic with
retain-counting as used in gstep-base or libFoundation as well.

An object is kept alive by it's handle and can only be messaged by a
handle.

Helge


More information about the Java mailing list