Go's heap arena size is currently 64MB on 64-bit platforms and 32MB on 32-bit and on Windows. From malloc.go:
"We use smaller arenas on Windows because all committed memory is charged to the process, even if it's not touched."
A similar situation exists on darwin/arm64.
I'm using Go in an iOS context that's limited to 16 MB of total memory (dirtied, unpageable memory).
The initial 64 MB virtual memory allocation is fine for a while, and Go's heap is steady at ~2.5MB of allocations.
But over time Go's runtime seems to touch enough of the 64 MB arena to dirty the pages and then iOS kills the process. I can gather stats & graphs if people are interested, but my main question is:
Are there any surprise gotchas if I simply change the arena to be 4MB on darwin/arm64 too?