Re: Using ArrayBuffer as payload for binary data to/from Web Workers

On Wed, Mar 9, 2011 at 3:40 PM, Boris Zbarsky <> wrote:
> On 3/9/11 1:54 PM, Glenn Maynard wrote:
>> Any system with memory protection can interrupt on write, which makes
>> copy-on-write very close to free, as long as you can page-align the
>> buffer.
> That's a pretty serious caveat, though.  And you're assuming that memory
> meta-operations like "set up a custom write interrupt handler for this page"
> are free, which is not exactly the case as I understand it.

I don't think the presence of an MMU is a serious caveat for an
optional optimization (even an important one), and you only need to
set it up when it turns into a COW buffer, not before each access.

Either way I agree with a direct zero-copy based API rather than
building on COW.  No sense introducing this complexity to
implementations if it won't actually make the API better.

Glenn Maynard

Received on Wednesday, 9 March 2011 21:36:30 UTC