Subject: mmap (hopefully the whole thing this time)
To: None <current-users@netbsd.org>
From: Dustin Sallings <dustin@spy.net>
List: current-users
Date: 11/04/1998 12:04:42
	Please excuse that last message, I was doing some testing, and my
machine got a little unresponsive and somehow I accidentally sent that
message before I was finished...

	Anyway, the question was...what does mmap actually do in NetBSD? 
According to The Magic Garden (which, I know, doesn't apply here),
everything referencing a shared map should be pointing to the same pages
in memory, yet if I have a lot of processes mapping a large file, it will
eat up all virtual memory on my system (causing it to do things like
spontaneously send mail I'm trying to compose).  This doesn't make sense
to me, but it is consistent with what happens Solaris and IRIX (where The
Magic Garden should apply). 

	So, I'm doing this:

source = mmap(NULL, st.st_size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0); 

	Yet it's eating up all my memory.  Is there a solution?  Am I
doing something wrong?

--
SA, beyond.com           My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE 
L_______________________ I hope the answer won't upset her. ____________