mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] runtime: replace uses of runtime/internal/sys.PtrSize with internal/goarch.PtrSize [generated]
[git-generate] cd src/runtime/internal/math gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go cd ../.. gofmt -w -r "sys.PtrSize -> goarch.PtrSize" . goimports -w *.go Change-Id: I43491cdd54d2e06d4d04152b3d213851b7d6d423 Reviewed-on: https://go-review.googlesource.com/c/go/+/328337 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
122f5e16d6
commit
6d85891b29
63 changed files with 349 additions and 336 deletions
|
|
@ -11,7 +11,7 @@ package runtime
|
|||
import (
|
||||
"internal/cpu"
|
||||
"runtime/internal/atomic"
|
||||
"runtime/internal/sys"
|
||||
"internal/goarch"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
|
@ -497,13 +497,13 @@ func recordspan(vh unsafe.Pointer, p unsafe.Pointer) {
|
|||
assertLockHeld(&h.lock)
|
||||
|
||||
if len(h.allspans) >= cap(h.allspans) {
|
||||
n := 64 * 1024 / sys.PtrSize
|
||||
n := 64 * 1024 / goarch.PtrSize
|
||||
if n < cap(h.allspans)*3/2 {
|
||||
n = cap(h.allspans) * 3 / 2
|
||||
}
|
||||
var new []*mspan
|
||||
sp := (*slice)(unsafe.Pointer(&new))
|
||||
sp.array = sysAlloc(uintptr(n)*sys.PtrSize, &memstats.other_sys)
|
||||
sp.array = sysAlloc(uintptr(n)*goarch.PtrSize, &memstats.other_sys)
|
||||
if sp.array == nil {
|
||||
throw("runtime: cannot allocate memory")
|
||||
}
|
||||
|
|
@ -1822,7 +1822,7 @@ func addfinalizer(p unsafe.Pointer, f *funcval, nret uintptr, fint *_type, ot *p
|
|||
scanobject(base, gcw)
|
||||
// Mark the finalizer itself, since the
|
||||
// special isn't part of the GC'd heap.
|
||||
scanblock(uintptr(unsafe.Pointer(&s.fn)), sys.PtrSize, &oneptrmask[0], gcw, nil)
|
||||
scanblock(uintptr(unsafe.Pointer(&s.fn)), goarch.PtrSize, &oneptrmask[0], gcw, nil)
|
||||
releasem(mp)
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue