]> Cypherpunks repositories - gostls13.git/commit
runtime: merge codepaths in scavengeLargest
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 31 Jan 2019 16:57:29 +0000 (16:57 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 8 Apr 2019 15:36:03 +0000 (15:36 +0000)
commit23d4c6cdd6712ba45ea4ec784bcb99cb883ab0ea
tree30655e3b961aaf9f6d8794ab9f1f92bd71760e4d
parentf70d457a366a498ff91c4fb8dd03eca576b898bb
runtime: merge codepaths in scavengeLargest

This change just makes the code in scavengeLargest easier to reason
about by reducing the number of exit points to the method. It should
still be correct either way because the condition checked at the end
(released > nbytes) will always be false if we return, but this just
makes the code a little easier to maintain.

Change-Id: If60da7696aca3fab3b5ddfc795d600d87c988238
Reviewed-on: https://go-review.googlesource.com/c/go/+/160617
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mheap.go