[lkml]   [2000]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: mmap/munmap semantics
Stephen C. Tweedie wrote:
> > - I need to "drop" a mapping sometimes without writing the contents
> > back to disk - I cannot see a way to do this with linux currently.
> The only way is to use Chuck Lever's madvise() patches:
> madvise(MADV_DONTNEED) is exactly what you need there. It's not yet in
> Linus's 2.3 tree, but the API is pretty standard.

I don't think MADV_DONTNEED actually drops privately modified data does
it? I thought it was merely a hint to the kernel that the data will not
be accessed again soon, so it can be paged out or, if unmodified,
dropped. All the other MADV_* flags are access hints.

-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean