In Go 1.2 goroutine stacks are 8k in size to start, so 8k x 200000 = 1.6GB.
Also, the way the GC works results in double the amount of virtual memory
being used than it actually needs before the next collection happens (on
If you use go 1.1, or the 1.3 beta, which both have 4k starting stacks, the
address space needed for stacks alone is halved.
Also note that it's address space that determines whether an allocation
will fail/succeed, and has no direct relation to the amount of memory that
is in use by the program (ie: it's working set), or the amount of RAM the
OS has given to it. Also, for an allocation to succeed that much contiguous
address space must exist as well, so memory fragmentation is also an issue.
There is nothing wrong with the 32-bit version of go, you are just hitting
the limits imposed by a 32-bit OS.
On Wednesday, April 30, 2014 8:24:21 AM UTC-7, Massimiliano Tomassoli wrote:
On Wednesday, April 30, 2014 4:40:17 PM UTC+2, Henrik Johansson wrote:
But didn't your "go version" say 386? I have no idea what it should say
on windows 7 64.
Is it possible to run the 386 version of Go on 64 bit windows?
You're right, I'm using the 32-bit version of go.
I installed the 64-bit version and now it works, but I still think there's
something wrong with the 32-bit version.
Windows reserves 2 GB to 32-bit processes (http://msdn.microsoft.com/en-us/library/windows/desktop/aa366912%28v=vs.85%29.aspx
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.