🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.wizards
Article #6992

mmap() question

#6992
From: Dawson R. Engler
Date: Mon, 11 Jan 1993 04:58
17 lines
980 bytes
Is it possible to mmap() shared memory *after* a fork() occurs?
The trouble with the man pages I've seen on mmap() is that
they imply all mappings must occur before fork().  An obvious problem
with this is that if I run out of shared memory and need more, using
mmap() to replenish may be difficult.

Do I have to pass open file descriptors between children if I want to
do this?  (ie. process A needs more memory, it opens a file, maps it
and then sends the file descriptor to process B, who will in turn will
map)

A simple, portable solution would be ideal. (what a surprise...;)

Regards,
	Dawson
	engler@cs.arizona.edu
Technical Details
Message-ID: <29523@optima.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!arizona!cs.arizona.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!arizona!cs.arizona.edu
From: engler@cs.arizona.edu (Dawson R. Engler)
Newsgroups: comp.unix.wizards
Subject: mmap() question
Message-ID: <29523@optima.cs.arizona.edu>
Date: 11 Jan 93 04:58:35 GMT
Sender: news@cs.arizona.edu
Organization: U of Arizona CS Dept, Tucson
Lines: 19