- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for divRoundUp (0.18 sec)
-
src/runtime/stubs.go
} // alignDown rounds n down to a multiple of a. a must be a power of 2. // //go:nosplit func alignDown(n, a uintptr) uintptr { return n &^ (a - 1) } // divRoundUp returns ceil(n / a). func divRoundUp(n, a uintptr) uintptr { // a is generally a power of two. This will get inlined and // the compiler will optimize the division. return (n + a - 1) / a }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 20.2K bytes - Viewed (0) -
src/runtime/pinner.go
bytep, mask := (*gcBits)(p).bitp(n * 2) byteVal := atomic.Load8(bytep) return pinState{bytep, byteVal, mask} } func (s *mspan) pinnerBitSize() uintptr { return divRoundUp(uintptr(s.nelems)*2, 8) } // newPinnerBits returns a pointer to 8 byte aligned bytes to be used for this // span's pinner bits. newPinnerBits is used to mark objects that are pinned.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 11K bytes - Viewed (0) -
src/runtime/mgcsweep.go
obj := uintptr(s.freeindex) if (*s.gcmarkBits.bytep(obj / 8)&^*s.allocBits.bytep(obj / 8))>>(obj%8) != 0 { s.reportZombies() } // Check remaining bytes. for i := obj/8 + 1; i < divRoundUp(uintptr(s.nelems), 8); i++ { if *s.gcmarkBits.bytep(i)&^*s.allocBits.bytep(i) != 0 { s.reportZombies() } } } // Count the number of free objects in this span.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:52:18 UTC 2024 - 32.9K bytes - Viewed (0)