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. --- Rationale.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Rationale.md') diff --git a/Rationale.md b/Rationale.md index 602f5bd..744c95b 100644 --- a/Rationale.md +++ b/Rationale.md @@ -106,10 +106,16 @@ tradeoffs. ## Resizing -Implementations provide a `page_size` operator which allows them to efficiently -map the underlying OS's capabilities to the WebAssembly application, as well as -to communicate their own implementation details in a useful manner to the -developer. +To allow efficient virtual-memory based techniques for bounds checking, memory +sizes are required to be page-aligned. +For portability across a range of CPU architectures and operating systems, +WebAssembly defines a fixed page size. +Programs can depend on this fixed page size and still remain portable across all +WebAssembly engines which employ efficient virtual memory techniques for bounds\ +checking. +64KiB represents the least common multiple of many platforms and CPUs. +In the future, WebAssembly may offer the ability to use larger page sizes on +some platforms for increased TLB efficiency. ## Linear memory disabled if no linear memory section -- cgit v1.2.3