]> Cypherpunks repositories - gostls13.git/commit
runtime: count scavenged bits for new allocation for new page allocator
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 10 Sep 2019 18:53:51 +0000 (18:53 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 7 Nov 2019 19:14:38 +0000 (19:14 +0000)
commite1ddf0507c6d6dcbe1a2ebe54b8728498edf0995
tree266bcd52947c4b4d79625e85a6f690f78c7059db
parent73317080e12234defb59f84e2b5b15f69650b5d5
runtime: count scavenged bits for new allocation for new page allocator

This change makes it so that the new page allocator returns the number
of pages that are scavenged in a new allocation so that mheap can update
memstats appropriately.

The accounting could be embedded into pageAlloc, but that would make
the new allocator more difficult to test.

Updates #35112.

Change-Id: I0f94f563d7af2458e6d534f589d2e7dd6af26d12
Reviewed-on: https://go-review.googlesource.com/c/go/+/195698
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/export_test.go
src/runtime/mpagealloc.go
src/runtime/mpagealloc_test.go
src/runtime/mpallocbits.go
src/runtime/mpallocbits_test.go