Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 11:58:24 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Jason Thorpe <thorpej@nas.nasa.gov>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, hackers@FreeBSD.ORG
Subject:   Re: MADV_SEQUENTIAL and GNU Grep 
Message-ID:  <199907291858.LAA77496@apollo.backplane.com>
References:   <199907291756.KAA00408@lestat.nas.nasa.gov>

next in thread | previous in thread | raw e-mail | index | archive | help

:Why?  I can think of at least one instance where this is useful: using
:a file in the file system as a shared memory handle.
:
:Seems as if the programmer erroneously MADV_FREE's a file, well ... you
:only supplied the rope.
:
:        -- Jason R. Thorpe <thorpej@nas.nasa.gov>

    My main worry here, putting it into words, is that malloc() uses
    MADV_FREE all over the place.  If a program gets corrupted due to
    bugs in the program and winds up corrupting malloc, I worry that
    the result could be bogus madvise() calls that destroy mmap()'d files
    that the program happens to be using at the time.  It may not be
    a justifiable worry, but it is enough that I am not gung-ho about
    implementing MADV_FREE on file mmaps.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907291858.LAA77496>