diff options
| author | Youlin Feng <fengyoulin@live.com> | 2022-10-05 15:29:29 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-18 18:06:27 +0000 |
| commit | 7ae652b7c0cddb8f6e04bfa6f5805baac823dd64 (patch) | |
| tree | 04b02db5fd0e54ac405a67b3ef6b297bffd0fbfb /src/runtime/malloc.go | |
| parent | c45ebef05edcb217be8f9bf1d7649763132727cc (diff) | |
| download | go-7ae652b7c0cddb8f6e04bfa6f5805baac823dd64.tar.xz | |
runtime: replace all uses of CtzXX with TrailingZerosXX
Replace all uses of Ctz64/32/8 with TrailingZeros64/32/8, because they
are the same and maybe duplicated. Also renamed CtzXX functions in 386
assembly code.
Change-Id: I19290204858083750f4be589bb0923393950ae6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/438935
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index cece04eeca..70a13d0576 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -816,7 +816,7 @@ var zerobase uintptr // nextFreeFast returns the next free object if one is quickly available. // Otherwise it returns 0. func nextFreeFast(s *mspan) gclinkptr { - theBit := sys.Ctz64(s.allocCache) // Is there a free object in the allocCache? + theBit := sys.TrailingZeros64(s.allocCache) // Is there a free object in the allocCache? if theBit < 64 { result := s.freeindex + uintptr(theBit) if result < s.nelems { |
