Re: Big mallocs, mmap sorrows and double buffering.

Snow Cat (snowcat@netgate.net)
Mon, 17 Feb 1997 23:33:06 -0800 (PST)


Scott Schwartz once wrote:
>
> Matti Aarnio <matti.aarnio@tele.fi> writes:
> | > Since PROT_WRITE is not set this is in effect a shared mapping (and Linux
> | > internally handles it like a shared mapping).
> |
> | Hmm.. Ok, perhaps it is so. It just isn't obvious.
>
> The down side is that where write() returns status, mmap() gives you a
> segmentation fault or bus error if the write failed for any reason
> (like, the disk got full). Also, there's no analog to fsync() to make
> sure that the data has actually hit stable storage.
>
>

Actually, there is an msync. But the second problem is tougher, especially
if later we want to support mmap for something other than disk files, that
can return errors under normal conditions. Do we need structured exception
handling for user code?

-- 
 _.    	        _       .  
(_ ,_  _ ,  .  / ` _ _L	 | Email: Oleg Kibirev <snowcat@netgate.net>
...._)| U(_)\/\/  \_,(_L/L  | Visit http://math.math.CSUFresno.EDU/~oleg/math.html
------------------------'  to get my programs + PGP public key