Ignore:
Timestamp:
Aug 8, 2017, 6:11:00 AM (8 years ago)
Author:
Yusuke Suzuki
Message:

[Linux] Clear WasmMemory with madvice instead of memset
https://bugs.webkit.org/show_bug.cgi?id=175150

Reviewed by Filip Pizlo.

In Linux, zeroing pages with memset populates backing store.
Instead, we should use madvise with MADV_DONTNEED. It discards
pages. And if you access these pages, on-demand-zero-pages will
be shown.

We also commit grown pages in all OSes.

  • wasm/WasmMemory.cpp:

(JSC::Wasm::commitZeroPages):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::grow):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r220377 r220401  
     12017-08-06  Yusuke Suzuki  <[email protected]>
     2
     3        [Linux] Clear WasmMemory with madvice instead of memset
     4        https://bugs.webkit.org/show_bug.cgi?id=175150
     5
     6        Reviewed by Filip Pizlo.
     7
     8        In Linux, zeroing pages with memset populates backing store.
     9        Instead, we should use madvise with MADV_DONTNEED. It discards
     10        pages. And if you access these pages, on-demand-zero-pages will
     11        be shown.
     12
     13        We also commit grown pages in all OSes.
     14
     15        * wasm/WasmMemory.cpp:
     16        (JSC::Wasm::commitZeroPages):
     17        (JSC::Wasm::Memory::create):
     18        (JSC::Wasm::Memory::grow):
     19
    1202017-08-07  Robin Morisset  <[email protected]>
    221
Note: See TracChangeset for help on using the changeset viewer.