forked from tetratelabs/wazero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set Memory.Max to min(user-memory-limit, sys-memory-limit) on load
Updated `newMemorySizer()` to return the updated value, but also ensure that an invalid `max` still throws an error (invalid module). - Minor cleanup to use the `memorySizer` type instead of the full func signature for clarity - Added a wat+wasm under `internal/integration_test/vs/testdata/` simply because that's where the other cache-related testdata was. Closes tetratelabs#1152. Signed-off-by: Edoardo Vacchi <[email protected]>
- Loading branch information
Showing
8 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(module | ||
(memory (export "memory") 1 5) ;; start with one memory page, and max of 4 pages | ||
(func $main | ||
|
||
(loop $my_loop | ||
(i32.gt_s | ||
(memory.grow (i32.const 1)) | ||
(i32.const 0)) | ||
br_if $my_loop | ||
unreachable) | ||
return | ||
) | ||
(start $main) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters