diff options
| author | Ben L. Titzer <titzer@google.com> | 2015-11-02 16:20:25 -0800 |
|---|---|---|
| committer | Ben L. Titzer <titzer@google.com> | 2015-11-02 16:20:25 -0800 |
| commit | b890cbdf35ef3ec70f87fcb52964c2f18e6a4b3f (patch) | |
| tree | 15eb4ae70aae6a226004544cab3dcc3cc5430573 /AstSemantics.md | |
| parent | 542c1623990c20c30fb363b667b48a09b5f27567 (diff) | |
| download | nanowasm-design-b890cbdf35ef3ec70f87fcb52964c2f18e6a4b3f.tar.gz | |
Fix the WebAssembly page size at 64KiB.
Diffstat (limited to 'AstSemantics.md')
| -rw-r--r-- | AstSemantics.md | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/AstSemantics.md b/AstSemantics.md index 1d91acc..a407c36 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -194,12 +194,11 @@ Out of bounds accesses trap. ### Resizing In the MVP, linear memory can be resized by a `grow_memory` operator. This -operator requires its operand to be a multiple of the system -page size. To determine page size, a nullary `page_size` operator is provided. +operator requires its operand to be a multiple of the WebAssembly page size, +which is 64KiB on all engines. * `grow_memory` : grow linear memory by a given unsigned delta which - must be a multiple of `page_size` - * `page_size` : nullary constant function returning page size in bytes + must be a multiple of 64KiB. As stated [above](AstSemantics.md#linear-memory), linear memory is contiguous, meaning there are no "holes" in the linear address space. After the @@ -212,13 +211,6 @@ operator may be added. However, due to normal fragmentation, applications are instead expected release unused physical pages from the working set using the [`discard`](FutureFeatures.md#finer-grained-control-over-memory) future feature. -The result type of `page_size` is `int32` for wasm32 and `int64` for wasm64. -The result value of `page_size` is an unsigned integer which is a power of 2. - -The `page_size` value need not reflect the actual internal page size of the -implementation; it just needs to be a value suitable for use with -`grow_memory`. - ## Local variables Each function has a fixed, pre-declared number of local variables which occupy a single |
