aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/traceallocfree.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/traceallocfree.go b/src/runtime/traceallocfree.go
index e1190394ed..3067e16670 100644
--- a/src/runtime/traceallocfree.go
+++ b/src/runtime/traceallocfree.go
@@ -45,11 +45,10 @@ func traceSnapshotMemory() {
// Find all allocated objects.
abits := s.allocBitsForIndex(0)
for i := uintptr(0); i < uintptr(s.nelems); i++ {
- if !abits.isMarked() {
- continue
+ if abits.index < uintptr(s.freeindex) || abits.isMarked() {
+ x := s.base() + i*s.elemsize
+ trace.HeapObjectExists(x, s.typePointersOfUnchecked(x).typ)
}
- x := s.base() + i*s.elemsize
- trace.HeapObjectExists(x, s.typePointersOfUnchecked(x).typ)
abits.advance()
}
}