Behavior of madvise(MADV_FREE)

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Oct 20 19:35:00 UTC 2012


--------
In message <5082F0F3.1070102 at rice.edu>, Alan Cox writes:

>I'm sympathetic.  Once upon a time, I was often called upon to explain 
>to network administrators why their idle web cache didn't have oodles of 
>"free" memory and how this wasn't a problem.

You too ?   :-)

>I think that you're being a bit too pessimistic here.  If your use case 
>really corresponds to "this memory is free and will not be reused (or 
>reallocated for a very long time)"

Which brings me to a question I have wondered:  Why not simply
munmap(2) it until you need it again ?

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list