Date: Tue, 13 Jul 1999 23:28:21 +0900 (JST) From: Noriyuki Soda <soda@sra.co.jp> To: "Brian F. Feldman" <green@FreeBSD.org> Cc: Noriyuki Soda <soda@sra.co.jp>, bright@rush.net, dcs@newsguy.com, freebsd-hackers@FreeBSD.org, jon@oaktree.co.uk, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Replacement for grep(1) (part 2) Message-ID: <199907131428.XAA09584@srapc342.sra.co.jp> In-Reply-To: <Pine.BSF.4.10.9907131010360.76301-100000@janus.syracuse.net> References: <199907130912.SAA07964@srapc342.sra.co.jp> <Pine.BSF.4.10.9907131010360.76301-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Tue, 13 Jul 1999 10:11:14 -0400 (EDT), "Brian F. Feldman" <green@FreeBSD.org> said: >> > you also have to consider a program wishing to make sparse use >> > of its address space, without overcommit it becomes impossible. >> >> SVR4 has MAP_NORESERVE option for mmap(2) for this. >> So, default behaivour don't have to be overcommitment. > Isn't that just like mmap()ing then mlock()ing the range? That would > keep it in core. No. MAP_NORESERVE is nothing related to page wiring (i.e. mlock()ing). From Solaris 2.6 man page: : The MAP_NORESERVE option specifies that no swap space be : reserved for a mapping. Without this flag, the creation of : a writable MAP_PRIVATE mapping reserves swap space equal to : the size of the mapping; when the mapping is written into, : the reserved space is employed to hold private copies of the : data. A write into a MAP_NORESERVE mapping produces results : which depend on the current availability of swap space in : the system. If space is available, the write succeeds and a : private copy of the written page is created; if space is not : available, the write fails and a SIGBUS or SIGSEGV signal is : delivered to the writing process. MAP_NORESERVE mappings are : inherited across fork(); at the time of the fork(), swap : space is reserved in the child for all private pages that : currently exist in the parent; thereafter the child's map- : ping behaves as described above. -- soda 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?199907131428.XAA09584>