Re: ROC's Proposal for fixing race conditions

On Aug 9, 2013, at 3:21 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> It looks like there's a similar mechanism for Windows, where you CreateFileMapping() to create a named object, which can then be mapped as copy-on-write with MapViewOfFile().  I haven't tested this either.
> 
> We don't want to mess around with files, because that will likely cause unnecessary write-back to storage. Maybe there's a way to create special temporary files that don't do that, but I don't know what it is. A tmpfs or ramfs would work but that might not be available.

You can create anonymous mappings by passing in INVALID_HANDLE_VALUE to CreateFileMapping() instead of a handle to a real file.

-Jer

Received on Friday, 9 August 2013 22:26:31 UTC