diff options
Diffstat (limited to 'src/runtime/stack.go')
| -rw-r--r-- | src/runtime/stack.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go index 562427a6a2..7860cb183e 100644 --- a/src/runtime/stack.go +++ b/src/runtime/stack.go @@ -337,7 +337,8 @@ func stackalloc(n uint32) stack { } if debug.efence != 0 || stackFromSystem != 0 { - v := sysAlloc(round(uintptr(n), _PageSize), &memstats.stacks_sys) + n = uint32(round(uintptr(n), physPageSize)) + v := sysAlloc(uintptr(n), &memstats.stacks_sys) if v == nil { throw("out of memory (stackalloc)") } |
