From ea8763fe83b98e47af39d0cb2c16e5c8db9746d3 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Wed, 5 Aug 2015 13:09:25 -1000 Subject: Address first round of comments --- FAQ.md | 2 +- FutureFeatures.md | 3 +++ Nondeterminism.md | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index 1e0fb5e..6c930fd 100644 --- a/FAQ.md +++ b/FAQ.md @@ -255,7 +255,7 @@ omission is: address space fragmentation). There are two problems with this: * This interleaving with unrelated allocations does not currently admit efficient security checks to prevent one module from corrupting data outside - its heap (see discussion in #285). + its heap (see discussion in [#285](https://github.com/WebAssembly/design/pull/285)). * This interleaving would require making allocation nondeterministic. Nondeterminism is something that WebAssemgly generally [tries to avoid](Nondeterminism.md) and in this particular case, history diff --git a/FutureFeatures.md b/FutureFeatures.md index f8a8397..07b4b05 100644 --- a/FutureFeatures.md +++ b/FutureFeatures.md @@ -47,6 +47,9 @@ Provide access to safe OS-provided functionality including: to `mmap(addr, length, MAP_FIXED | MAP_PRIVATE, fd)` * `dont_need(addr, length)`: semantically, this operation zeroes the given range but the implementation is encouraged to `madvise(addr, length, MADV_DONTNEED)` + (this allows applications to be good citizens and release unused physical + pages back to the OS, thereby reducing their RSS and avoiding OOM-killing on + mobile) * `shmem_create(length)`: create a memory object that can be simultaneously shared between multiple linear memories * `map_shmem(addr, length, shmem, shmem-offset)`: like `map_file` except diff --git a/Nondeterminism.md b/Nondeterminism.md index 7685216..8a5e956 100644 --- a/Nondeterminism.md +++ b/Nondeterminism.md @@ -31,7 +31,10 @@ currently admits nondeterminism: nondeterministic. * Out of bounds heap accesses *may* want [some flexibility](AstSemantics.md#out-of-bounds) - * The [`page_size` global constant](AstSemantics.md#resizing) + * The `page_size` global constant is device-dependent. The arguments to the + [`resize_memory`](AstSemantics.md#resizing) and other + [future memory management builtins](FutureFeatures.md#finer-grained-control-over-memory) + are required to be multiples of `page_size`. * NaN bit patterns in floating point [operations](AstSemantics.md#floating-point-operations) and [conversions](AstSemantics.md#datatype-conversions-truncations-reinterpretations-promotions-and-demotions) -- cgit v1.2.3