mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
wasm: fix heap end address
This commit is contained in:
@@ -16,7 +16,7 @@ var heapStartSymbol unsafe.Pointer
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
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
|
const wasmPageSize = 64 * 1024
|
||||||
|
|||||||
Reference in New Issue
Block a user