From owner-freebsd-bugs Sun Oct 20 07:30:05 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA22114 for bugs-outgoing; Sun, 20 Oct 1996 07:30:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA22102; Sun, 20 Oct 1996 07:30:03 -0700 (PDT) Resent-Date: Sun, 20 Oct 1996 07:30:03 -0700 (PDT) Resent-Message-Id: <199610201430.HAA22102@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:"from scrooge.ee.swin.oz.au (scrooge.ee.swin.oz.au [136.186.4.20]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA21448 for" ; Sun, 20 Oct 1996 07:23:38.-0700 (PDT) Received: (from dtc@localhost) by scrooge.ee.swin.oz.au (8.6.9/8.6.9) id AAA16935 for FreeBSD-gnats-submit@freebsd.org; Mon, 21 Oct 1996 00:25:19 +1000 Message-Id: <199610201425.AAA16935@scrooge.ee.swin.oz.au> Date: Mon, 21 Oct 1996 00:25:18 +1000 (EST) From: Douglas Thomas Crosher To: FreeBSD-gnats-submit@freebsd.org Subject: docs/1851: madvise MADV_FREE manual page clarification Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: