W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: ROC's Proposal for fixing race conditions

From: Jer Noble <jer.noble@apple.com>
Date: Fri, 09 Aug 2013 14:42:12 -0700
Cc: WG <public-audio@w3.org>
Message-id: <57EC41D3-92A4-49E9-822D-20C14E2DE80A@apple.com>
To: Robert O'Callahan <robert@ocallahan.org>

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

> On Sat, Aug 10, 2013 at 7:21 AM, Jer Noble <jer.noble@apple.com> wrote:
> I'm not an expert on either, but this is how you'd get it to work on Mach kernels:
> 
> https://gist.github.com/jernoble/6196382
> 
> As far as I know, Linux and Windows have no equivalent of mach_make_memory_entry. I had even tried mmaping /proc/self/mem on Linux as a dastardly hack, but it didn't work :-).

Well, the equivalent would be shm_open(), then mmap'ing the resulting file descriptor. I just don't think you can MAP_PRIVATE from a shared memory object.  :-(

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.

-Jer
Received on Friday, 9 August 2013 21:42:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:10 UTC