From: ted@nmsu.edu (Ted Dunning) Subject: Re: mmap & shared memory Date: Sun, 16 Feb 1992 07:12:13 GMT
In article <1992Feb14.144302.8897@daimi.aau.dk> tthorn@daimi.aau.dk (Tommy Thorn) writes:
I need shared memory for Postgres. mmap is not
as needed, but shouldn't be that hard compared to
shared memory.
actually, mmap is a truly wonderful thing if done well.
sample uses i have seen include:
lazy read of disk buffers in sun's implementation of read. at a user
level, this can save a copy in i/o intensive programs.
implementing guard pages for triggering garbage collection.
allowing copy on write so that lisp can share all unmodified bits with
other lisp processes, but not worry what bits those are.
implementation of novel vm schemes by trapping SIGSEGV.
data bases which mmap huge files and then depend on virtual memory to
swap them in as needed. this allows the use of simple methods such as
fast in-memory string searches to be used on files. great fun.
a lexical analyzer can mmap an entire file copy on write and then run
the lexical analyzer destructively on the mmap'ed source code.