]> Cypherpunks repositories - gostls13.git/commit
runtime: clarify access to mheap_.busy
authorAustin Clements <austin@google.com>
Mon, 6 Feb 2017 00:34:16 +0000 (19:34 -0500)
committerAustin Clements <austin@google.com>
Fri, 3 Mar 2017 17:02:18 +0000 (17:02 +0000)
commit77f64c50dbaca5fcec8198a575f6c345cb80ad69
tree25ff4e618171c9228febbb4be1394845d9e695aa
parentb50b72858714f29f7147c0d58444398345ac8188
runtime: clarify access to mheap_.busy

There are two accesses to mheap_.busy that are guarded by checks
against len(mheap_.free). This works because both lists are (and must
be) the same length, but it makes the code less clear. Change these to
use len(mheap_.busy) so the access more clearly parallels the check.

Fixes #18944.

Change-Id: I9bacbd3663988df351ed4396ae9018bc71018311
Reviewed-on: https://go-review.googlesource.com/36354
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mheap.go