From 242a1843d1f91e22d97db055fa3badc84cca4762 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 24 Nov 2018 19:00:42 +0100 Subject: [PATCH] wasm: fix heap end address --- src/runtime/arch_wasm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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