diff options
Diffstat (limited to 'test/mallocrep.go')
| -rw-r--r-- | test/mallocrep.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/mallocrep.go b/test/mallocrep.go index 2911b4a051..8373cc0eb9 100644 --- a/test/mallocrep.go +++ b/test/mallocrep.go @@ -31,15 +31,17 @@ func bigger() { func main() { flag.Parse(); + malloc.GetStats().alloc = 0; // ignore stacks for i := 0; i < 1<<8; i++ { for j := 1; j <= 1<<22; j<<=1 { if i == 0 && chatty { println("First alloc:", j); } b := malloc.Alloc(uint64(j)); + during := malloc.GetStats().alloc; malloc.Free(b); if a := malloc.GetStats().alloc; a != 0 { - panicln("malloc wrong count", a); + panicln("malloc wrong count", a, "after", j, "during", during); } bigger(); } |
