]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] runtime: make mTreap.find actually find the best fit
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 23 Apr 2019 18:57:16 +0000 (18:57 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 Apr 2019 16:42:23 +0000 (16:42 +0000)
commit438b1a5dae01812a2b91b648c762414d4854ccd7
treebdf68a95cea3158b6bfebb9132bbc18499c72354
parenta1a9d8a84d4924cb2d374b33cb5844b2e43c6fe9
[release-branch.go1.12] runtime: make mTreap.find actually find the best fit

This change modifies the implementation of mTreap.find to find the
best-fit span with the lowest possible base address.

Fixes #31677.

Change-Id: Ib4bda0f85d7d0590326f939a243a6e4665f37d3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/173479
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
(cherry picked from commit 8c05d67661c966f5130e51ca685b0c70a5a929ff)
Reviewed-on: https://go-review.googlesource.com/c/go/+/173939
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/mgclarge.go
src/runtime/treap_test.go