diff options
| author | Austin Clements <austin@google.com> | 2018-09-25 15:44:27 -0400 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2018-10-09 16:43:18 +0000 |
| commit | 3f86d7cc6762a5f6745cdcda4bd50031bfafc92f (patch) | |
| tree | 82f29ccede14e5e51898c173657b2692962db642 /src/runtime/mcentral.go | |
| parent | 5440bfc2ea8c0a4c78d5161605659c07ea10e37a (diff) | |
| download | go-3f86d7cc6762a5f6745cdcda4bd50031bfafc92f.tar.xz | |
runtime: tidy mheap.freeSpan
freeSpan currently takes a mysterious "acct int32" argument. This is
really just a boolean and actually just needs to match the "large"
argument to alloc in order to balance out accounting.
To make this clearer, replace acct with a "large bool" argument that
must match the call to mheap.alloc.
Change-Id: Ibc81faefdf9f0583114e1953fcfb362e9c3c76de
Reviewed-on: https://go-review.googlesource.com/c/138655
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/mcentral.go')
| -rw-r--r-- | src/runtime/mcentral.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mcentral.go b/src/runtime/mcentral.go index 9ca8e5d222..baede31405 100644 --- a/src/runtime/mcentral.go +++ b/src/runtime/mcentral.go @@ -244,7 +244,7 @@ func (c *mcentral) freeSpan(s *mspan, preserve bool, wasempty bool) bool { c.nonempty.remove(s) unlock(&c.lock) - mheap_.freeSpan(s, 0) + mheap_.freeSpan(s, false) return true } |
