]> Cypherpunks repositories - gostls13.git/commit
runtime: use divRoundUp
authorAustin Clements <austin@google.com>
Fri, 20 Mar 2020 15:37:54 +0000 (11:37 -0400)
committerAustin Clements <austin@google.com>
Fri, 20 Mar 2020 16:05:35 +0000 (16:05 +0000)
commitd965bb613086cd780cf73418bcdeaef50a9afc55
treed57632acdcb73de11dafae0b3db55d58fd9cb2ae
parentab5a40c5e3162a565b26de4b1e7595f7922ba761
runtime: use divRoundUp

There are a handful of places where the runtime wants to round up the
result of a division. We just introduced a helper to do this. This CL
replaces all of the hand-coded round-ups (that I could find) with this
helper.

Change-Id: I465d152157ff0f3cad40c0aa57491e4f2de510ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/224385
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/malloc.go
src/runtime/mgcmark.go
src/runtime/mgcsweepbuf.go
src/runtime/msize.go