Hello,
I was running the code from Robert Hundt's benchmark to compare the performance of Go with other languages. The Go code from the benchmark (see link) doesn't say how to increase the stack size although it is mentioned for the code for Scala, Java in their make files (which is -server -Xss15500k). So I inevitably run into this (as the recursive test algorithm causes the stack to become very large):
__________________________________________________________________________________________________
Welcome to LoopTesterApp, Go edition
Constructing Simple CFG...
15000 dummy loops
Constructing CFG...
Performing Loop Recognition
1 Iteration
Another 50 iterations...
................throw: out of memory
goroutine 1 [running]:
container/list.(*List).PushBack(0x7feeeb00, 0x47a274, 0x7bedde30, 0x7bedde30, 0x7b551bc0, ...)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/container/list/list.go:145 +0x28
havlakloopfinder.FindLoops(0x11560030, 0x7b54ee20, 0x40159e)
C:/Users/Nutzer/IdeaProjects/GoFirst/src/havlakloopfinder/havlakloopfinder.go:328 +0x103f
havlakloopfinder.FindHavlakLoops(0x11560030, 0x7b54ee20, 0x0, 0x0)
C:/Users/Nutzer/IdeaProjects/GoFirst/src/havlakloopfinder/havlakloopfinder.go:382 +0x30
main.main()
C:/Users/Nutzer/IdeaProjects/GoFirst/src/looptesterapp.go:112 +0x31f
goroutine 2 [syscall]:
created by runtime.main
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist721200707/go/src/pkg/runtime/proc.c:221
Process finished with exit code 2
__________________________________________________________________________________________________
Any ideas what I could do?
Thanks, Oliver
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group, send email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Go uses segmented stacks, they grow as needed. You aren't getting a stack overflow, you are "out of memory" like the error says. Notice that your stack dump is only 4 calls deep.Maybe:
- There is a memory leak
- You don't have enough memory to run the test
- You are hitting the max heap size (fixed on tip: http://code.google.com/p/go/issues/detail?id=2142)