diff options
| author | Austin Clements <austin@google.com> | 2017-06-13 11:32:17 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2017-09-27 16:29:09 +0000 |
| commit | 84d2c7ea835c238f466de64066b65614d1bc7dbe (patch) | |
| tree | 79a73176bd18bb496e8505afdcd848b1c1c0b044 /src/runtime/runtime2.go | |
| parent | 197f9ba11d4559cbd19350ca652da7881f4b273f (diff) | |
| download | go-84d2c7ea835c238f466de64066b65614d1bc7dbe.tar.xz | |
runtime: dynamically allocate allp
This makes it possible to eliminate the hard cap on GOMAXPROCS.
Updates #15131.
Change-Id: I4c422b340791621584c118a6be1b38e8a44f8b70
Reviewed-on: https://go-review.googlesource.com/45573
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 27b1e37803..269c5b1c4d 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -722,7 +722,8 @@ const _TracebackMaxFrames = 100 var ( allglen uintptr allm *m - allp [_MaxGomaxprocs + 1]*p + allp []*p // len(allp) == gomaxprocs; may change at safe points, otherwise immutable + allpLock mutex // Protects P-less reads of allp and all writes gomaxprocs int32 ncpu int32 forcegc forcegcstate |
