mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: make mTreap iterator bidirectional
This change makes mTreap's iterator type, treapIter, bidirectional instead of unidirectional. This change helps support moving the find operation on a treap to return an iterator instead of a treapNode, in order to hide the details of the treap when accessing elements. For #28479. Change-Id: I5dbea4fd4fb9bede6e81bfd089f2368886f98943 Reviewed-on: https://go-review.googlesource.com/c/156918 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
44cf595a7e
commit
4b3f04c63b
3 changed files with 34 additions and 36 deletions
|
|
@ -337,7 +337,7 @@ func ReadMemStatsSlow() (base, slow MemStats) {
|
|||
slow.BySize[i].Frees = bySize[i].Frees
|
||||
}
|
||||
|
||||
for i := mheap_.scav.iter(); i.valid(); i = i.next() {
|
||||
for i := mheap_.scav.start(); i.valid(); i = i.next() {
|
||||
slow.HeapReleased += uint64(i.span().released())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue