Re: [PATCH] lazy freeing of memory through MADV_FREE 2/2

Ulrich Drepper
2007-04-21T16:32:17Z

On 4/21/07, Hugh Dickins <hugh@veritas.com> wrote:
> But the Linux MADV_DONTNEED does throw away
> data from a PROT_WRITE,MAP_PRIVATE mapping (or brk or stack) - those
> changes are discarded, and a subsequent access will revert to zeroes
> or the underlying mapped file. Been like that since before 2.4.0.

I didn't say it changed. I just say that there is a hole in the
current implementation as it does not allow to implement
POSIX_MADV_DONTNEED with anything but a no-op. The
POSIX_MADV_DONTNEED behavior is useful and something IMO should be
added to allow implementing it.