mlock usage
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > mlock usage




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    mlock usage  
j0mbolar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-04 10:44 PM

say we have a small program that is about 16k
and we want to ensure that the entire thing is in memory
so we use mlock.

mlock expects an address followed by the number of bytes
to ensure in memory. What address should I get that would resemble
the starting address of my program? And should I get the size
of the executable and add that to the starting address for
the len size?

also, what happens with data passed to functions in
shared libraries? is it possible for data passed to
functions in shared libraries to end up in swap, when
using mlock?





[ Post a follow-up to this message ]



    Re: mlock usage  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-04 10:44 PM

j0mbolar wrote:
> say we have a small program that is about 16k
> and we want to ensure that the entire thing is in memory
> so we use mlock.

Use 'mlockall'.

DS







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:25 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register