aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/heapdump.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/heapdump.go')
-rw-r--r--src/runtime/heapdump.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/heapdump.go b/src/runtime/heapdump.go
index e18aa79164..0add63acb4 100644
--- a/src/runtime/heapdump.go
+++ b/src/runtime/heapdump.go
@@ -730,14 +730,13 @@ func makeheapobjbv(p uintptr, size uintptr) bitvector {
i := uintptr(0)
hbits := heapBitsForAddr(p)
for ; i < nptr; i++ {
- bits := hbits.typeBits()
- if bits == typeDead {
+ if i >= 2 && !hbits.isMarked() {
break // end of object
}
- hbits = hbits.next()
- if bits == typePointer {
+ if hbits.isPointer() {
tmpbuf[i/8] |= 1 << (i % 8)
}
+ hbits = hbits.next()
}
return bitvector{int32(i), &tmpbuf[0]}
}