diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2019-09-04 16:12:10 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2019-11-08 00:07:43 +0000 |
commit | 33dfd3529b8a761739da00da88eb13d39300a679 (patch) | |
tree | f0d2a316d0de7d90824895c4756cadbe7e6a8f33 /src/runtime/gc_test.go | |
parent | e6135c27682988a490166629f6a52f5102791bcb (diff) | |
download | go-33dfd3529b8a761739da00da88eb13d39300a679.tar.gz go-33dfd3529b8a761739da00da88eb13d39300a679.zip |
runtime: remove old page allocator
This change removes the old page allocator from the runtime.
Updates #35112.
Change-Id: Ib20e1c030f869b6318cd6f4288a9befdbae1b771
Reviewed-on: https://go-review.googlesource.com/c/go/+/195700
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/gc_test.go')
-rw-r--r-- | src/runtime/gc_test.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go index efabc05a43..54a0e7d604 100644 --- a/src/runtime/gc_test.go +++ b/src/runtime/gc_test.go @@ -464,29 +464,6 @@ func TestReadMemStats(t *testing.T) { } } -func TestUnscavHugePages(t *testing.T) { - if !runtime.OldPageAllocator { - // This test is only relevant for the old page allocator. - return - } - // Allocate 20 MiB and immediately free it a few times to increase - // the chance that unscavHugePages isn't zero and that some kind of - // accounting had to happen in the runtime. - for j := 0; j < 3; j++ { - var large [][]byte - for i := 0; i < 5; i++ { - large = append(large, make([]byte, runtime.PhysHugePageSize)) - } - runtime.KeepAlive(large) - runtime.GC() - } - base, slow := runtime.UnscavHugePagesSlow() - if base != slow { - logDiff(t, "unscavHugePages", reflect.ValueOf(base), reflect.ValueOf(slow)) - t.Fatal("unscavHugePages mismatch") - } -} - func logDiff(t *testing.T, prefix string, got, want reflect.Value) { typ := got.Type() switch typ.Kind() { |