mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
197f9ba11d
commit
84d2c7ea83
6 changed files with 47 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue