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 | b014be75d222e684ff34c94cd27aba88968dd36f (patch) | |
| tree | 36c9cc73a47e1982105d95309a0b3753f891c694 /test/mallocrep.go | |
| parent | 4f30ec7fcb793a4037ffa951db2b11b092c56a51 (diff) | |
| download | go-b014be75d222e684ff34c94cd27aba88968dd36f.tar.xz | |
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 6aa8fdf8cb..6306e59ebc 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(); } |
