Re: [PATCH] lazy freeing of memory through MADV_FREE

Ulrich Drepper
2007-04-22T16:55:22Z

On 4/22/07, Christoph Hellwig <hch@infradead.org> wrote:
> Why isn't MADV_FREE defined to 5 for linux? It's our first free madv
> value? Also the behaviour should better match the one in solaris or BSD,
> the last thing we need is slightly different behaviour from operating
> systems supporting this for ages.

The behavior should indeed be identical. Both implementations
restrict MADV_FREE to work on anonymous memory and it is unspecified
whether a renewed access yields to a zerod page being created or
whether the old content is still there. So, just use 0x5 for both the
Linux and Solaris version on sparc.