Re: How to lock an object?
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