*BSD News Article 31251


Return to BSD News archive

Xref: sserve comp.unix.programmer:17428 comp.unix.questions:50217 comp.unix.bsd:14101
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!uwm.edu!cs.utexas.edu!math.ohio-state.edu!darwin.sura.net!newsserver.jvnc.net!netnews.upenn.edu!hodgkin.med.upenn.edu!blackman
From: blackman@hodgkin.med.upenn.edu (David Blackman)
Newsgroups: comp.unix.programmer,comp.unix.questions,comp.unix.bsd
Subject: Re: mmap memory/disk synchronization
Date: 5 Jun 1994 15:26:29 GMT
Organization: University of Pennsylvania
Lines: 22
Distribution: world
Message-ID: <2ssqr5$nl2@netnews.upenn.edu>
References: <2so8tj$fkp@netnews.upenn.edu>
NNTP-Posting-Host: hodgkin.med.upenn.edu
Keywords: mmap, msync

To summarize the responses to my question on synchronizing
mmaped memory, the answer is to use msync(2).  Thanks to:

   Rich Scott <rxscot2@lookout.ecte.uswc.uswest.com>
   Rob.Gingell@Eng.Sun.COM (Rob Gingell)
   Jyrki Havia <havia@cc.helsinki.fi>

The original question:

>Using SunOS 4.x, is there a way to insure that a disk file and a
>segment of memory mapped with mmap are consistent - i.e. to guarantee
>that all writes to the memory segment are on disk?  I would like
>something like fflush but fflush wants a FILE * parameter and mmap
>wants an int fd.

Thanks.

-- 
David Blackman
blackman@hodgkin.med.upenn.edu
(215) 572-1141