Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Does Mac OS X support interior pointers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does Mac OS X support interior pointers?




On Sep 10, 2009, at 8:41 AM, Clark Cox wrote:

Yes, this can have unfortunate
side-effects for the Obj-C GC in MacOS X; No, this is not an issue of
GCC/clang not conforming to 6.2.4.

I agree this isn't a conformance issue, but the GC side effects are worth focusing on, regardless. I haven't run into them myself, but I haven't developed any really major apps with GC yet (just my Mercurial client Murky.)


Off-list I suggested to an Apple engineer that the compiler should avoid optimizing away stack storage of local variables that point to Obj-C objects, when GC is enabled. The response was that this had been investigated but led to too much heap growth (i.e. too many actual garbage objects being held onto by unused local variables.)

Not sure what else to suggest. It seems there needs to be a way to explicitly mark that you're keeping a reference to an object, since declaring a local variable pointing to it isn't sufficient. Maybe some sort of "__dont_optimize_away" annotation on the local variable?

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Does Mac OS X support interior pointers? (From: John Engelhart <email@hidden>)
 >Re: Does Mac OS X support interior pointers? (From: John Engelhart <email@hidden>)
 >Re: Does Mac OS X support interior pointers? (From: Clark Cox <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.