diff options
author | Russ Cox <rsc@golang.org> | 2009-06-05 10:59:37 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-05 10:59:37 -0700 |
commit | 9586b8668bc752d306f9809dcf74e955331e2f8e (patch) | |
tree | 36c9cc73a47e1982105d95309a0b3753f891c694 /test/mallocrep.go | |
parent | 3ef9634db68330266388315ee04a9d37b6701f44 (diff) | |
download | golang-9586b8668bc752d306f9809dcf74e955331e2f8e.tar.gz |
fix 386 malloc tests,
detect 386 darwin breakpoint line.
R=r
DELTA=22 (4 added, 0 deleted, 18 changed)
OCL=29929
CL=29944
Diffstat (limited to 'test/mallocrep.go')
-rw-r--r-- | test/mallocrep.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/mallocrep.go b/test/mallocrep.go index 6aa8fdf8c..6306e59eb 100644 --- a/test/mallocrep.go +++ b/test/mallocrep.go @@ -36,11 +36,14 @@ func main() { if i == 0 && *chatty { println("First alloc:", j); } - b := malloc.Alloc(uint64(j)); + if a := malloc.GetStats().Alloc; a != 0 { + panicln("no allocations but stats report", a, "bytes allocated"); + } + b := malloc.Alloc(uintptr(j)); during := malloc.GetStats().Alloc; malloc.Free(b); if a := malloc.GetStats().Alloc; a != 0 { - panicln("malloc wrong count", a, "after", j, "during", during); + panic("allocated ", j, ": wrong stats: during=", during, " after=", a, " (want 0)"); } bigger(); } |