diff options
author | Michael Anthony Knyszek <mknyszek@google.com> | 2019-10-17 17:42:15 +0000 |
---|---|---|
committer | Michael Knyszek <mknyszek@google.com> | 2019-11-07 20:14:02 +0000 |
commit | 689f6f77f0d54b597ebc82e9bc4a8e1a59bce04d (patch) | |
tree | f1cdd32b56fa969b849d7f236dc8ebd05c219dc2 /src/runtime/gc_test.go | |
parent | 21445b091ec0a0625282603e2730d10b34396375 (diff) | |
download | go-689f6f77f0d54b597ebc82e9bc4a8e1a59bce04d.tar.gz go-689f6f77f0d54b597ebc82e9bc4a8e1a59bce04d.zip |
runtime: integrate new page allocator into runtime
This change integrates all the bits and pieces of the new page allocator
into the runtime, behind a global constant.
Updates #35112.
Change-Id: I6696bde7bab098a498ab37ed2a2caad2a05d30ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/201764
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go index ee80021301..efabc05a43 100644 --- a/src/runtime/gc_test.go +++ b/src/runtime/gc_test.go @@ -465,6 +465,10 @@ 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. |