From b890cbdf35ef3ec70f87fcb52964c2f18e6a4b3f Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Mon, 2 Nov 2015 16:20:25 -0800 Subject: Fix the WebAssembly page size at 64KiB. --- AstSemantics.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'AstSemantics.md') 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 -- cgit v1.2.3