Behavior of madvise(MADV_FREE)

Marcel Moolenaar marcel at xcllnt.net
Sun Oct 21 02:33:06 UTC 2012


On Oct 20, 2012, at 1:12 PM, Alan Cox <alc at rice.edu> wrote:

> 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).

Correct.

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the freebsd-arch mailing list