Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AstSemantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ 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 WebAssembly page size,
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
the [future](FutureFeatures.md#large-page-support)).

* `grow_memory` : grow linear memory by a given unsigned delta which
must be a multiple of the page size. Return the previous memory size.
* `grow_memory` : grow linear memory by a given unsigned delta of pages.
Return the previous memory size in bytes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, for consistency the result should also be in pages now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, and what about memory_size?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be consensus to change the argument to pages so perhaps that could land first and then you could champion a change of the memory_size to pages too in a follow up PR, or do people want it changed here too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, sgtm


As stated [above](AstSemantics.md#linear-memory), linear memory is contiguous,
meaning there are no "holes" in the linear address space. After the
Expand Down