Date: Thu, 11 May 2000 15:57:39 -0400 (EDT) Message-Id: <200005111957.PAA13569@indy.delorie.com> From: Eli Zaretskii To: Martin Stromberg CC: djgpp-workers AT delorie DOT com In-reply-to: <200005111438.QAA05671@lws256.lu.erisoft.se> (message from Martin Stromberg on Thu, 11 May 2000 16:38:51 +0200 (MET DST)) Subject: Re: Perfomance of gc-simple References: <200005111438 DOT QAA05671 AT lws256 DOT lu DOT erisoft DOT se> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Martin Stromberg > Date: Thu, 11 May 2000 16:38:51 +0200 (MET DST) > > But Solaris' man page says: > "The use of MAP_FIXED is discouraged, as it may prevent an > implementation from making the most effective use of system > resources." > > I also saw a similar statement on Linux. > > So it's strange that a test for mmap() uses a feature that is > discouraged! It uses MAP_FIXED because Grep uses it. And Grep uses it because it does an mmap on each file it processes, and it doesn't want to relocate the working buffer each time, I guess. Anyway, Grep only uses mmap when given a special command-line option now, since using mmap can lose in some rare cases where the normal I/O wins. I guess that covers the discouragement as well ;-).