]> Cypherpunks repositories - gostls13.git/commit
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)
committerMichael Knyszek <mknyszek@google.com>
Thu, 25 Apr 2019 18:15:21 +0000 (18:15 +0000)
commit8c05d67661c966f5130e51ca685b0c70a5a929ff
treeb3f0da7bb18f5283e3028053a9b70551950895ce
parent93fcebaf31965760c3bc8c087cb7e46127397994
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 #31616.

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>
src/runtime/mgclarge.go
src/runtime/treap_test.go