Re: [go-nuts] How to increase stack size

842 views
Skip to first unread message

Dan Cross

unread,
Jan 28, 2013, 5:36:58 PM1/28/13
to jet...@web.de, golang-nuts
Not a direct answer to your question, but I really wouldn't look too closely at Hundt's benchmark results.  For more, see this:


On Sun, Jan 27, 2013 at 9:43 AM, <jet...@web.de> wrote:
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.
 
 

Rémy Oudompheng

unread,
Jan 29, 2013, 12:35:25 AM1/29/13
to golan...@googlegroups.com
On Tuesday, January 29, 2013 3:32:52 AM UTC+1, Frederick Mayle wrote:
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:

He is running on Windows 32-bits, which seriously limits the amount of available memory.

Rémy.
Reply all
Reply to author
Forward
0 new messages