typed array filling convenience AND performance
luke at mozilla.com
Tue Nov 4 20:55:48 PST 2014
ArrayBuffer.transfer provides a coarser granularity than the proposed ArrayBuffer.prototype.discard in bug 855669. Page-level madvise(MADV_DONTNEED) is the type of thing you'd want if you were implementing a malloc heap (jemalloc being an example). OTOH, ArrayBuffer.transfer also allows you to immediately release virtual address space, something discard doesn't, so I think these features are complementary.
----- Original Message -----
> Steve Fink wrote:
> > I'm not sure we're talking about the same thing. I'm talking about what
> > would be madvise(MADV_DONTNEED) on POSIX or VirtualAlloc(MEM_RESET) on
> > Windows. Er... actually, I think it would be MEM_RESET followed by
> > MEM_COMMIT to get the zero-filling while still releasing the physical
> > pages.
> Luke should weigh in. I had in mind the words "either truncated or
> zero-extended to be newByteLength" from
More information about the es-discuss