diff --git a/src/runtime/arch_wasm.go b/src/runtime/arch_wasm.go index 00f97895..cc856df6 100644 --- a/src/runtime/arch_wasm.go +++ b/src/runtime/arch_wasm.go @@ -16,7 +16,7 @@ var heapStartSymbol unsafe.Pointer var ( heapStart = uintptr(unsafe.Pointer(&heapStartSymbol)) - heapEnd = (heapStart + wasmPageSize - 1) & (wasmPageSize - 1) // conservative guess: one page of heap memory + heapEnd = (heapStart + wasmPageSize - 1) &^ (wasmPageSize - 1) // conservative guess: one page of heap memory ) const wasmPageSize = 64 * 1024