Thread (7 messages) 7 messages, 5 authors, 2000-02-24

Re: mmap/munmap semantics

From: lars brinkhoff <hidden>
Date: 2000-02-24 13:06:08

"Stephen C. Tweedie" wrote:
On Thu, 24 Feb 2000 03:35:02 +0100, Jamie Lokier
[off-list ref] said:
quoted
I don't think MADV_DONTNEED actually drops privately modified data does
it?
Yes, it does.  From the DU man pages:

      MADV_DONTNEED
                      Do not need these pages

                      The system will free any whole pages in the specified
                      region.  All modifications will be lost and any swapped
                      out pages will be discarded.  Subsequent access to the
                      region will result in a zero-fill-on-demand fault as
                      though it is being accessed for the first time.
                      Reserved swap space is not affected by this call.
From a FreeBSD man page at
http://dorifer.heim3.tu-clausthal.de/cgi-bin/man/madvise.2.html

     MADV_DONTNEED    Allows the VM system to decrease the in-memory priority
                      of pages in the specified range.  Additionally future
                      references to this address range will incur a page
                      fault.

     MADV_FREE        Gives the VM system the freedom to free pages, and tells
                      the system that information in the specified page range
                      is no longer important.  This is an efficient way of al-
                      lowing malloc(3) to free pages anywhere in the address
                      space, while keeping the address space valid.  The next
                      time that the page is referenced, the page might be de-
                      mand zeroed, or might contain the data that was there
                      before the MADV_FREE call.  References made to that ad-
                      dress space range will not make the VM system page the
                      information back in from backing store until the page is
                      modified again.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help