• 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: How to lock an object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to lock an object?


  • Subject: Re: How to lock an object?
  • From: Greg Parker <email@hidden>
  • Date: Thu, 4 Jun 2009 12:22:52 -0700

On Jun 4, 2009, at 7:25 AM, cocoa learner wrote:
I want one of my object, not to be paged out unless and until I am done with
my object. The way mlock() behave.


Is there any way to do this in cocoa?

First answer: No. You can't lock all of the code and metadata associated with the object, so you could still get page faults when you try to call methods. Also, method dispatch sometimes takes locks, which is as bad as a page fault depending what you're trying to do.


Second answer: Use mlock().


-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________

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


  • Follow-Ups:
    • Re: How to lock an object?
      • From: cocoa learner <email@hidden>
References: 
 >How to lock an object? (From: cocoa learner <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 6, Issue 831
  • Next by Date: including cocoa in cpp file
  • Previous by thread: Re: How to lock an object?
  • Next by thread: Re: How to lock an object?
  • Index(es):
    • Date
    • Thread