Re: Garbage collector vs variable lifetime
Re: Garbage collector vs variable lifetime
- Subject: Re: Garbage collector vs variable lifetime
- From: Paul Sargent <email@hidden>
- Date: Sun, 8 Jun 2008 11:23:16 +0100
On 8 Jun 2008, at 01:23, Bill Bumgarner wrote:
One of the tenets of GCC is that *it controls the layout of the
stack always* and this is done quite explicitly because of
performance.
I think this is the crucial point when considering how any GC will
work with gcc.
If gcc controls the stack, it's impossible for the programmer to
dictate what is in the root set. They can make some suggestions, and
possibly influence it with hacks (such as [data self]), but absolute
control is ceded to the compiler.
It's a fundamental truth for any GC on top of gcc, and one that makes
the job of writing the GC one I wouldn't ever want. I don't think it's
possible to make a 100% fool proof GC without more compiler support,
or internal pointer support (which is non-trivial).
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden