MCPcopy
hub / github.com/etcd-io/bbolt / FreeCount

Method FreeCount

internal/freelist/hashmap.go:108–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106}
107
108func (f *hashMap) FreeCount() int {
109 common.Verify(func() {
110 expectedFreePageCount := f.hashmapFreeCountSlow()
111 if int(f.freePagesCount) != expectedFreePageCount {
112 panic(fmt.Sprintf("assertion failed: freePagesCount (%d) is out of sync with free pages map (%d)",
113 f.freePagesCount, expectedFreePageCount))
114 }
115 })
116 return int(f.freePagesCount)
117}
118
119func (f *hashMap) freePageIds() common.Pgids {
120 count := f.FreeCount()

Callers 1

freePageIdsMethod · 0.95

Calls 2

hashmapFreeCountSlowMethod · 0.95
VerifyFunction · 0.92

Tested by

no test coverage detected