Commit db406241 authored by Russ Cox's avatar Russ Cox

[dev.garbage] runtime: raise StackGuard limit for Windows (again)

640 bytes ought to be enough for anybody.

We'll bring this back down before Go 1.5. That's issue 9214.

TBR=rlh
CC=golang-codereviews
https://golang.org/cl/188730043
parent fa6c5495
...@@ -17,7 +17,7 @@ enum { ...@@ -17,7 +17,7 @@ enum {
#endif // Windows #endif // Windows
StackBig = 4096, StackBig = 4096,
StackGuard = 512 + StackSystem, StackGuard = 640 + StackSystem,
StackSmall = 128, StackSmall = 128,
StackLimit = StackGuard - StackSystem - StackSmall, StackLimit = StackGuard - StackSystem - StackSmall,
}; };
......
...@@ -84,7 +84,7 @@ const ( ...@@ -84,7 +84,7 @@ const (
// The stack guard is a pointer this many bytes above the // The stack guard is a pointer this many bytes above the
// bottom of the stack. // bottom of the stack.
_StackGuard = 512 + _StackSystem _StackGuard = 640 + _StackSystem
// After a stack split check the SP is allowed to be this // After a stack split check the SP is allowed to be this
// many bytes below the stack guard. This saves an instruction // many bytes below the stack guard. This saves an instruction
......
...@@ -268,11 +268,11 @@ TestCases: ...@@ -268,11 +268,11 @@ TestCases:
name := m[1] name := m[1]
size, _ := strconv.Atoi(m[2]) size, _ := strconv.Atoi(m[2])
// The limit was originally 128 but is now 384. // The limit was originally 128 but is now 512.
// Instead of rewriting the test cases above, adjust // Instead of rewriting the test cases above, adjust
// the first stack frame to use up the extra 32 bytes. // the first stack frame to use up the extra 32 bytes.
if i == 0 { if i == 0 {
size += 384 - 128 size += 512 - 128
} }
if size%ptrSize == 4 { if size%ptrSize == 4 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment