Commit d62239b5 authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime/debug: make TestFreeOSMemory repeatable

Fixes #4835.

R=golang-dev, fullung
CC=golang-dev
https://golang.org/cl/7319050
parent 8ecc4cb4
......@@ -71,11 +71,12 @@ func TestReadGCStats(t *testing.T) {
}
}
var big = make([]byte, 1<<20)
var big []byte
func TestFreeOSMemory(t *testing.T) {
var ms1, ms2 runtime.MemStats
big = make([]byte, 1<<20)
big = nil
runtime.GC()
runtime.ReadMemStats(&ms1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment