Source File
mcheckmark.go
Belonging Package
runtime
package runtime
import (
)
type checkmarksMap [heapArenaBytes / sys.PtrSize / 8]uint8
var useCheckmark = false
func () {
assertWorldStopped()
= (*checkmarksMap)(persistentalloc(unsafe.Sizeof(*), 0, &memstats.gcMiscSys))
if == nil {
throw("out of memory allocating checkmarks bitmap")
}
.checkmarks =
for := range {
[] = 0
}
}
useCheckmark = true
}
func () {
if gcMarkWorkAvailable(nil) {
throw("GC work not flushed")
}
useCheckmark = false
}
gcDumpObject("base", , )
gcDumpObject("obj", , ^uintptr(0))
getg().m.traceback = 2
throw("checkmark found unmarked object")
}
:= arenaIndex()
:= mheap_.arenas[.l1()][.l2()]
:= ( / heapArenaBytes / 8) % uintptr(len(.checkmarks))
:= byte(1 << (( / heapArenaBytes) % 8))
:= &.checkmarks[]
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |