Already a member? Log in

Sign up with your...

or

Sign Up with your email address

Add Tags

Duplicate Tags

Rename Tags

Share It With Others!

Save Link

Sign in

Sign Up with your email address

Sign up

By clicking the button, you agree to the Terms & Conditions.

Forgot Password?

Please enter your username below and press the send button.
A password reset link will be sent to you.

If you are unable to access the email address originally associated with your Delicious account, we recommend creating a new account.

ADVERTISEMENT

URL: http://objectivistc.tumblr.com/post/7872364181/tagged-pointers-and-fast-pathed-cfnumber-integers-in

Share It With Others!

Comments

Interesting notes on Objective-C "tagged pointers" in Lion: http://t.co/UQojoUI Some objects may not be actual objects! /via @kimon

CFNumber (and, consequently, NSNumber) takes advantage of tagged pointers for integers — if an integer can fit in the payload of a tagged pointer then no actual CFNumber is created. Instead, the memory address represents the integer number itself according to the following layout…

"Every tagged pointer has its lowest bit set, hence tagged pointers are odd integers" Strikes me as a really bad idea.

ADVERTISEMENT
ADVERTISEMENT