mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: add new page allocator core
This change adds a new bitmap-based allocator to the runtime with tests. It does not yet integrate the page allocator into the runtime and thus this change is almost purely additive. Updates #35112. Change-Id: Ic3d024c28abee8be8797d3918116a80f901cc2bf Reviewed-on: https://go-review.googlesource.com/c/go/+/190622 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
05aa4a7b74
commit
39e8cb0faa
6 changed files with 1716 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
// Ensures that got and want are the same, and if not, reports
|
||||
// detailed diff information.
|
||||
func checkPallocBits(t *testing.T, got, want *PallocBits) {
|
||||
func checkPallocBits(t *testing.T, got, want *PallocBits) bool {
|
||||
d := DiffPallocBits(got, want)
|
||||
if len(d) != 0 {
|
||||
t.Errorf("%d range(s) different", len(d))
|
||||
|
|
@ -22,7 +22,9 @@ func checkPallocBits(t *testing.T, got, want *PallocBits) {
|
|||
t.Logf("\t| got: %s", StringifyPallocBits(got, bits))
|
||||
t.Logf("\t| want: %s", StringifyPallocBits(want, bits))
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// makePallocBits produces an initialized PallocBits by setting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue