Behavior of madvise(MADV_FREE)

Alan Cox alc at rice.edu
Sat Oct 20 20:12:26 UTC 2012


On 10/20/2012 14:34, Poul-Henning Kamp wrote:
> --------
> 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 ?
>

My recollection is that Marcel said that the memory was acquired via 
sbrk(2).




More information about the freebsd-arch mailing list