runtime: add and use runtime/internal/sys.NotInHeap

Updates #46731

Change-Id: Ic2208c8bb639aa1e390be0d62e2bd799ecf20654
Reviewed-on: https://go-review.googlesource.com/c/go/+/421878
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Cuong Manh Le 2022-08-07 17:43:57 +07:00
parent 833367e98a
commit a719a78c1b
19 changed files with 133 additions and 125 deletions

View file

@ -160,8 +160,8 @@ var stackpool [_NumStackOrders]struct {
_ [cpu.CacheLinePadSize - unsafe.Sizeof(stackpoolItem{})%cpu.CacheLinePadSize]byte
}
//go:notinheap
type stackpoolItem struct {
_ sys.NotInHeap
mu mutex
span mSpanList
}