Date: Mon, 21 Oct 1996 00:25:18 +1000 (EST) From: Douglas Thomas Crosher <dtc@scrooge.ee.swin.oz.au> To: FreeBSD-gnats-submit@freebsd.org Subject: docs/1851: madvise MADV_FREE manual page clarification Message-ID: <199610201425.AAA16935@scrooge.ee.swin.oz.au> Resent-Message-ID: <199610201430.HAA22102@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1851 >Category: docs >Synopsis: madvise MADV_FREE manual page clarification >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 20 07:30:01 PDT 1996 >Last-Modified: >Originator: Douglas Crosher >Organization: Swinburne University >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD-current, Oct 18. >Description: >From the madvise manual page: "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 impor- tant. This is an efficient way of allowing malloc(3) to free pages any- where in the address space, while keeping the address space valid. The next time that the page is referenced, the page might be demand zeroed, or might contain the data that was there before the MADV_FREE call. ..." I have a slight query on the behaviour of MADV_FREE. My initial interpretation was that after a MADV_FREE a page would either be zero filled or remain unchanged. However I found that pages could have different data in them after the MADV_FREE call. >How-To-Repeat: I've seen this behaviour while experimenting with page freeing strategies for a garbage collector for CMUCL. I tried to zero fill the pages then call madvise MADV_FREE in the hope they would be zero the next time there were accessed, however some pages were not zero filled. >Fix: Perhaps the documentation could be made a little clearer, I suggest: "... The next time that the page is referenced, the page might be demand zeroed, or might contain random data." >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610201425.AAA16935>