• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is the "id" type an immovable pointer? Or a movable handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is the "id" type an immovable pointer? Or a movable handle


  • Subject: Re: Is the "id" type an immovable pointer? Or a movable handle
  • From: John Stiles <email@hidden>
  • Date: Fri, 2 Feb 2007 10:51:46 -0800

On Feb 2, 2007, at 10:43 AM, Matt Neuburg wrote:

On Wed, 31 Jan 2007 18:06:56 -0500, Ken Tozier <email@hidden> said:
if objects don't move around in memory after allocation, I
could just package the id to an NSNumber and use that for the key.

Anyone know if ids are pointers or handles?

The pre-X distinction between pointers and handles is obviated by Mac OS X
memory management. Under Mac OS X, objects move around in memory all the
time (unless they are explicitly wired down). But your code doesn't know
about this, because there is a virtual memory map between your code and the
actual storage. In other words, under Mac OS X, *all* pointers are actually
handles. Sort of. Anyway, this clearly isn't what you wanted to know. :) m.

To be more pedantic/literal about it, it's any 4K memory pages that can move around in memory, not pointers per se.
In other words, the granularity isn't based on pointers but rather memory pages.
(I know you know this but the OP may not ... )
At any rate this is clearly unrelated to anything the OP is asking about ;) It all happens in mysterious, murky places inside the kernel. To our code, memory is a simple flat plane, never reshuffled or swapped out.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Re: Is the "id" type an immovable pointer? Or a movable handle (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Next by Date: Re: Regular Expressions with OgreKit
  • Previous by thread: Re: Is the "id" type an immovable pointer? Or a movable handle
  • Next by thread: Re: Please can any one sugest or send me Email validation code.
  • Index(es):
    • Date
    • Thread