diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-10-31 23:48:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-10-31 23:48:19 +0000 |
commit | 2b193803d720f1cb5451af62d0805e7371851578 (patch) | |
tree | 9c767b63079e2f30d1689cd0eade8669a97ec459 /gcc/go | |
parent | da235df878ef89ef944328af97cafed56987c8a2 (diff) | |
download | gcc-2b193803d720f1cb5451af62d0805e7371851578.zip gcc-2b193803d720f1cb5451af62d0805e7371851578.tar.gz gcc-2b193803d720f1cb5451af62d0805e7371851578.tar.bz2 |
runtime: If no split stacks, allocate stacks using mmap on 64-bit systems.
When not using split stacks, libgo allocate large stacks for each
goroutine. On a 64-bit system, libgo allocates a maximum of 128G for
the Go heap, and allocates 4M for each stack. When the stacks are
allocated from the Go heap, the result is that a program can only create
32K goroutines, which is not enough for an active Go server. This patch
changes libgo to allocate the stacks using mmap directly, rather than
allocating them out of the Go heap. This change is only done for 64-bit
systems when not using split stacks. When using split stacks, the
stacks are allocated using mmap directly anyhow. On a 32-bit system,
there is no maximum size for the Go heap, or, rather, the maximum size
is the available address space anyhow.
Reviewed-on: https://go-review.googlesource.com/16531
From-SVN: r229636
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 8eae1f4..d2c9492 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -17cc10f7fb07e3f37448feaeb416b52618ae8bbb +1c1f226662a6c84eae83f8aaec3d4503e70be843 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. |