[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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220401
268f45cc-cd09-0410-ab3c-
d52691b4dbfc