On Thu, 23 Sep 1999, Matthew Dillon wrote:

> 
> :> > Thoughts?
> :> 
> :> man madvise?
> :> 
> :
> :Yeah, but MADV_FREE doesn't really do what I need. I have no idea if the
> :system actually did free my ram or not. I want to hang on to the data, but
> :if more ram is needed, then it can be discarded, but I need to know that it
> :did, so that I can recreate it. Checking every time I blit an object to see
> :if the page is zero'ed won't work.
> :
> :Kevin
> 
>     madvise ... MADV_DONTNEED is what you want.  The data will remain mapped
>     until the system reuses it, at which point it reverts to zero-fill.

Don't you mean MADV_FREE?

-Alfred

> 
>     The system will reuse the data fairly quickly, even if the system is
>     not all that loaded.
> 
>     You can lock the page back in simply by writing to something in the page.
> 
>     The system implements this madvise feature by marking the pages clean.
>     If you happen to write to the page before the system reuses it, it of
>     course gets redirtied.  If you don't and the system reuses the page,
>     it goes bye bye (turns into zero-fill) from the point of view of your
>     process.
> 
>                                       -Matt
>                                       Matthew Dillon 
>                                       <[EMAIL PROTECTED]>
> 
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message
> 



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to