]> Cypherpunks repositories - gostls13.git/commit
runtime: fix handling VirtualAlloc failure in sysUsed
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 24 Nov 2015 03:29:06 +0000 (14:29 +1100)
committerRuss Cox <rsc@golang.org>
Tue, 24 Nov 2015 14:50:23 +0000 (14:50 +0000)
commit1cb53ce36bc8b69e2f3ed9113d3b0f1d9d0d1405
tree89c91f1a550fc9fd08d36d181fefe308c019318e
parentc28a8e4553fed920425c6c9cb32d20f2da2f7a9a
runtime: fix handling VirtualAlloc failure in sysUsed

Original code is mistakenly panics on VirtualAlloc failure - we want
it to go looking for smaller memory region that VirtualAlloc will
succeed to allocate. Also return immediately if VirtualAlloc succeeds.
See rsc comment on issue #12587 for details.

I still don't have a test for this. So I can only hope that this

Fixes #12587

Change-Id: I052068ec627fdcb466c94ae997ad112016f734b7
Reviewed-on: https://go-review.googlesource.com/17169
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/mem_windows.go