diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2025-03-09 17:19:48 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2025-10-06 16:01:40 -0700 |
| commit | 7fbf54bfebf9243550177bc6871d80e58bedf1a6 (patch) | |
| tree | 4d3f6de17a59c652e85996f22c1933e84efca162 /test | |
| parent | 7bfeb43509acbe75ce8e1a14c60bffe597e46813 (diff) | |
| download | go-7fbf54bfebf9243550177bc6871d80e58bedf1a6.tar.xz | |
internal/buildcfg: enable greenteagc experiment by default
Slightly bump the value in Test/wasmmemsize.go. We use 1 additional page
compared to before, and we were already sitting *right* on the edge.
For #73581.
Change-Id: I485df16c3cf59803a8a1fc852b3e90666981ab09
Reviewed-on: https://go-review.googlesource.com/c/go/+/656195
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/wasmmemsize.dir/main.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/wasmmemsize.dir/main.go b/test/wasmmemsize.dir/main.go index e3aa5b5e92..c51e6b3b04 100644 --- a/test/wasmmemsize.dir/main.go +++ b/test/wasmmemsize.dir/main.go @@ -9,17 +9,19 @@ import ( "io" ) -// Expect less than 3 MB of memory usage for a small wasm program. -// This reflects the current allocator. If the allocator changes, -// update this value. -const want = 3 << 20 +// Wasm page size. +const pageSize = 64 * 1024 + +// Expect less than 3 MB + 1 page of memory usage for a small wasm +// program. This reflects the current allocator. If the allocator +// changes, update this value. +const want = 3<<20 + pageSize var w = io.Discard func main() { fmt.Fprintln(w, "hello world") - const pageSize = 64 * 1024 sz := uintptr(currentMemory()) * pageSize if sz > want { fmt.Printf("FAIL: unexpected memory size %d, want <= %d\n", sz, want) |
