diff options
| author | Luke Wagner <luke@mozilla.com> | 2016-03-30 18:11:50 -0500 |
|---|---|---|
| committer | Luke Wagner <luke@mozilla.com> | 2016-03-31 10:46:05 -0500 |
| commit | 0918d83d23aa421e956dfbcaeefd9faeae94237e (patch) | |
| tree | 9a4144e17d6a84aff9b40e7a7c7ac749632b2936 /AstSemantics.md | |
| parent | 1c9de01a77a66279e9c7a20cd580a74a5ffbc511 (diff) | |
| download | nanowasm-design-0918d83d23aa421e956dfbcaeefd9faeae94237e.tar.gz | |
Change max to optional and hard
Diffstat (limited to 'AstSemantics.md')
| -rw-r--r-- | AstSemantics.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/AstSemantics.md b/AstSemantics.md index cb73c63..9296087 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -202,11 +202,15 @@ Out of bounds accesses trap. In the MVP, linear memory can be resized by a `grow_memory` operator. The operand to this operator is in units of the WebAssembly page size, -which is 64KiB on all engines (though large page support may be added in +which is defined to be 64KiB (though large page support may be added in the [future](FutureFeatures.md#large-page-support)). * `grow_memory` : grow linear memory by a given unsigned delta of pages. - Return the previous memory size in bytes. + Return the previous memory size in units of pages or -1 on failure. + +`grow_memory` must fail when attempting to grow past the maximum declared +size, if one is specified in the [memory section](Module.md#linear-memory-section). +`grow_memory` may also fail if an underlying system allocation fails. As stated [above](AstSemantics.md#linear-memory), linear memory is contiguous, meaning there are no "holes" in the linear address space. After the |
