mirror of
https://github.com/golang/go
synced 2024-11-26 11:38:01 -07:00
runtime/debug: deflake TestFreeOSMemory
This is followup to https://golang.org/cl/7319050/ R=golang-dev, dave CC=golang-dev https://golang.org/cl/7379043
This commit is contained in:
parent
06a488fa97
commit
e5b0bcebdb
@ -70,12 +70,14 @@ func TestReadGCStats(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
var big []byte
|
||||
var big = make([]byte, 1<<20)
|
||||
|
||||
func TestFreeOSMemory(t *testing.T) {
|
||||
var ms1, ms2 runtime.MemStats
|
||||
|
||||
big = make([]byte, 1<<20)
|
||||
if big == nil {
|
||||
t.Skip("test is not reliable when run multiple times")
|
||||
}
|
||||
big = nil
|
||||
runtime.GC()
|
||||
runtime.ReadMemStats(&ms1)
|
||||
|
Loading…
Reference in New Issue
Block a user