Some of the bits still encode the pointer to the object’s class. But neither OS X nor iOS actually uses all 64 bits of virtual address space. The Objective-C runtime may use these extra bits to store per-object data like its retain count or whether it has been weakly referenced.
This is along the lines of what Marcel Weiher recently suggested except that the class objects are grouped so that the class pointer only needs 30 bits. This leaves 19 bits for the extra retain count, plus more for flags such as whether there are weak references or associated objects.
This should be great for reducing memory use and increasing speed. On the Mac, accessing
isa directly has been discouraged for a long time, so hopefully this optimization will eventually show up there as well.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.