From d4cc35c4fdbc37ad3bbc42ff6d6dcba6007b169b Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Wed, 27 Mar 2024 20:44:18 +0800 Subject: all: make use of builtin clear Change-Id: I1df0685c75fc1044ba46003a69ecc7dfc53bbc2b Reviewed-on: https://go-review.googlesource.com/c/go/+/574675 Reviewed-by: Ian Lance Taylor Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor --- src/runtime/mbitmap_allocheaders.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/runtime/mbitmap_allocheaders.go') diff --git a/src/runtime/mbitmap_allocheaders.go b/src/runtime/mbitmap_allocheaders.go index 1ec055352e..5f1f978189 100644 --- a/src/runtime/mbitmap_allocheaders.go +++ b/src/runtime/mbitmap_allocheaders.go @@ -544,9 +544,7 @@ func bulkBarrierPreWriteSrcOnly(dst, src, size uintptr, typ *abi.Type) { func (s *mspan) initHeapBits(forceClear bool) { if (!s.spanclass.noscan() && heapBitsInSpan(s.elemsize)) || s.isUserArenaChunk { b := s.heapBits() - for i := range b { - b[i] = 0 - } + clear(b) } } -- cgit v1.3