1
0
mirror of https://github.com/golang/go synced 2024-11-26 09:08:07 -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:
Dmitriy Vyukov 2013-02-20 12:34:16 +04:00
parent 06a488fa97
commit e5b0bcebdb

View File

@ -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)