mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
wasm: fix heap end address
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user