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 12:21:11 -0700
Cc: WG <public-audio@w3.org>
Message-id: <E01FD061-5610-4345-8E13-B29A2C0F1BAE@apple.com>
To: Robert O'Callahan <robert@ocallahan.org>

On Aug 8, 2013, at 11:29 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Fri, Aug 9, 2013 at 5:53 PM, Jer Noble <jer.noble@apple.com> wrote:
> It seems as though your proposal could be implemented on any platform with support for copy-on-write page semantics, without requiring neutering any outstanding ArrayBuffers.  E.g., on Posix platforms, the "acquire the contents" step could simply mmap(MAP_PRIVATE) the source memory, and if the original memory contents are modified, the AudioBuffer gets a fresh copy.
> 
> I considered trying to use mmap to create copy-on-write snapshots of memory blocks but couldn't figure out how to get it to work on Linux or Windows. Can you be specific about exactly how this would work?

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

-Jer

Received on Friday, 9 August 2013 19:21:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC