[Webkit-unassigned] [Bug 170343] WebAssembly: recycle fast memories more better

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 31 13:09:04 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=170343

Geoffrey Garen <ggaren at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ggaren at apple.com

--- Comment #1 from Geoffrey Garen <ggaren at apple.com> ---
For large allocations that need zero-backing, we generally prefer MADV_FREE_REUSABLE with explicit zeroing because it avoids the (very large) cost of page faults.

JF pointed out that Emscripten doesn't support grow-on-demand heaps, so lots of WASM programs demand very large heaps that they don't use. If that's true, WASM may be an exception to our general strategy, and it may benefit from MADV_ZERO_WIRED_PAGES or some other madvise/mmap API that forces on-demand page-fault-and-zero-fill behavior, since the memory cost of huge overcommits may be too high.

>  5. We could return the fast memories if we GC a few times and never reuse them, or if we get a "low-memory" signal from the system.

There's no point to unmapping cached fast memories in response to low memory warnings because they don't hold any physical pages.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170331/6ea3e5c2/attachment.html>


More information about the webkit-unassigned mailing list