• 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: cocoa learner <email@hidden>
  • Date: Fri, 5 Jun 2009 10:03:15 +0600

How can I use mlock() for NSString and NSTextField?As argument to mlock is
address of memory area and length.
I have address of memory area but I do not have the length (as these are
objects).

Regards
Cocoa.learner

On Fri, Jun 5, 2009 at 1:22 AM, Greg Parker <email@hidden> wrote:

> 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: Greg Parker <email@hidden>
    • Re: How to lock an object?
      • From: Rob Keniger <email@hidden>
References: 
 >How to lock an object? (From: cocoa learner <email@hidden>)
 >Re: How to lock an object? (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: How to lock an object?
  • Next by Date: Re: How to animate an object in a circle, but preserve it's orientation
  • Previous by thread: Re: How to lock an object?
  • Next by thread: Re: How to lock an object?
  • Index(es):
    • Date
    • Thread