Xref: utzoo comp.arch:17251 comp.lang.functional:306 comp.lang.lisp:3427 comp.lang.prolog:2964 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bbn.com!lkaplan From: lkaplan@bbn.com (Larry Kaplan) Newsgroups: comp.arch,comp.lang.functional,comp.lang.lisp,comp.lang.prolog Subject: Re: GC triggering and stack limit checking by MMU hardware Message-ID: <58338@bbn.BBN.COM> Date: 20 Jul 90 19:02:44 GMT References: <1990Jul19.151524.22544@diku.dk> <3260@swi.swi.psy.uva.nl> Sender: news@bbn.com Reply-To: lkaplan@BBN.COM (Larry Kaplan) Followup-To: comp.arch Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 24 In article schwartz@groucho.cs.psu.edu (Scott E. Schwartz) writes: > >In article <3260@swi.swi.psy.uva.nl> > jan@swi.psy.uva.nl (Jan Wielemaker) writes: >| Both schemas are not ideal. The mmap() requires a file and reads the >| file into the page as a page is mapped. This is a waste of resources; I >| just want a page of uninitialised memory and need no file. > >Rather than mapping a file, you can map /dev/zero, which provides zero >filled copy on write pages. Ever hear of anonymous mapped memory. Check out the 4.3BSD Architecture Manual (PS1:6) for a description of this rarely (or almost never) implemented feature. Using MAP_ANON causes the memory to be zero filled, but not necessarily copy on write. It is more meant for sharing of zero initialized pages. The file descriptor is only used for rendezvous. We've implemented it here and found it very useful. #include _______________________________________________________________________________ ____ \ / ____ Laurence S. Kaplan | \ 0 / | BBN Advanced Computers lkaplan@bbn.com \____|||____/ 10 Fawcett St. (617) 873-2431 /__/ | \__\ Cambridge, MA 02238