// things like .debug_addr (needed for DWARF 5).
dwarf5Supported := (goos != "darwin" && goos != "ios" && goos != "aix")
+ // The compiler crashes while compiling some of the Green Tea code.
+ // The Green Tea code is pretty normal, so this is likely a compiler
+ // bug in the loong64 port.
+ greenTeaGCSupported := goarch != "loong64"
+
baseline := goexperiment.Flags{
RegabiWrappers: regabiSupported,
RegabiArgs: regabiSupported,
Dwarf5: dwarf5Supported,
RandomizedHeapBase64: true,
SizeSpecializedMalloc: true,
+ GreenTeaGC: greenTeaGCSupported,
}
// Start with the statically enabled set of experiments.
"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)