type go.etcd.io/bbolt.pgid
115 uses
go.etcd.io/bbolt (current package)
bucket.go#L35: nodes map[pgid]*node // node cache
bucket.go#L50: root pgid // page id of the bucket's root-level page
bucket.go#L59: b.nodes = make(map[pgid]*node)
bucket.go#L70: func (b *Bucket) Root() pgid {
bucket.go#L502: func (b *Bucket) _forEachPageNode(pgid pgid, depth int, fn func(*page, *node, int)) {
bucket.go#L643: func (b *Bucket) node(pgid pgid, parent *node) *node {
bucket.go#L705: func (b *Bucket) pageNode(id pgid) (*page, *node) {
cursor.go#L175: var pgid pgid
cursor.go#L196: var pgid pgid
cursor.go#L247: func (c *Cursor) search(key []byte, pgid pgid) {
db.go#L25: const pgidNoFreelist pgid = 0xffffffffffffffff
db.go#L430: p := db.pageInBuffer(buf[:], pgid(i))
db.go#L431: p.id = pgid(i)
db.go#L447: p := db.pageInBuffer(buf[:], pgid(2))
db.go#L448: p.id = pgid(2)
db.go#L453: p = db.pageInBuffer(buf[:], pgid(3))
db.go#L454: p.id = pgid(3)
db.go#L884: func (db *DB) page(id pgid) *page {
db.go#L885: pos := id * pgid(db.pageSize)
db.go#L890: func (db *DB) pageInBuffer(b []byte, id pgid) *page {
db.go#L891: return (*page)(unsafe.Pointer(&b[id*pgid(db.pageSize)]))
db.go#L937: var minsz = int((p.id+pgid(count))+1) * db.pageSize
db.go#L945: db.rwtx.meta.pgid += pgid(count)
db.go#L986: func (db *DB) freepages() []pgid {
db.go#L998: reachable := make(map[pgid]*page)
db.go#L999: nofreed := make(map[pgid]bool)
db.go#L1009: var fids []pgid
db.go#L1010: for i := pgid(2); i < db.meta().pgid; i++ {
db.go#L1120: freelist pgid
db.go#L1121: pgid pgid
db.go#L1153: p.id = pgid(m.txid % 2)
freelist.go#L12: ids []pgid
freelist.go#L18: type pidSet map[pgid]struct{}
freelist.go#L24: ids []pgid // all free and available free page ids.
freelist.go#L25: allocs map[pgid]txid // mapping of txid that allocated a pgid.
freelist.go#L27: cache map[pgid]bool // fast lookup of all free and pending page ids.
freelist.go#L29: forwardMap map[pgid]uint64 // key is start pgid, value is its span size
freelist.go#L30: backwardMap map[pgid]uint64 // key is end pgid, value is its span size
freelist.go#L31: allocate func(txid txid, n int) pgid // the freelist allocate func
freelist.go#L34: getFreePageIDs func() []pgid // get free pgids func
freelist.go#L35: readIDs func(pgids []pgid) // readIDs func reads list of pages and init the freelist
freelist.go#L42: allocs: make(map[pgid]txid),
freelist.go#L44: cache: make(map[pgid]bool),
freelist.go#L46: forwardMap: make(map[pgid]uint64),
freelist.go#L47: backwardMap: make(map[pgid]uint64),
freelist.go#L74: return int(pageHeaderSize) + (int(unsafe.Sizeof(pgid(0))) * n)
freelist.go#L98: func (f *freelist) copyall(dst []pgid) {
freelist.go#L109: func (f *freelist) arrayAllocate(txid txid, n int) pgid {
freelist.go#L114: var initial, previd pgid
freelist.go#L126: if (id-initial)+1 == pgid(n) {
freelist.go#L139: for i := pgid(0); i < pgid(n); i++ {
freelist.go#L172: for id := p.id; id <= p.id+pgid(p.overflow); id++ {
freelist.go#L259: func (f *freelist) freed(pgid pgid) bool {
freelist.go#L273: c := *(*pgid)(unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p)))
freelist.go#L284: var ids []pgid
freelist.go#L289: idsCopy := make([]pgid, count)
freelist.go#L299: func (f *freelist) arrayReadIDs(ids []pgid) {
freelist.go#L304: func (f *freelist) arrayGetFreePageIDs() []pgid {
freelist.go#L324: var ids []pgid
freelist.go#L330: var ids []pgid
freelist.go#L333: ids[0] = pgid(l)
freelist.go#L345: pcache := make(map[pgid]bool)
freelist.go#L354: var a []pgid
freelist.go#L365: func (f *freelist) noSyncReload(pgids []pgid) {
freelist.go#L367: pcache := make(map[pgid]bool)
freelist.go#L376: var a []pgid
freelist.go#L389: f.cache = make(map[pgid]bool, len(ids))
freelist_hmap.go#L16: func (f *freelist) hashmapAllocate(txid txid, n int) pgid {
freelist_hmap.go#L29: for i := pgid(0); i < pgid(n); i++ {
freelist_hmap.go#L51: f.addSpan(pid+pgid(n), remain)
freelist_hmap.go#L53: for i := pgid(0); i < pgid(n); i++ {
freelist_hmap.go#L54: delete(f.cache, pid+pgid(i))
freelist_hmap.go#L64: func (f *freelist) hashmapReadIDs(pgids []pgid) {
freelist_hmap.go#L72: func (f *freelist) hashmapGetFreePageIDs() []pgid {
freelist_hmap.go#L78: m := make([]pgid, 0, count)
freelist_hmap.go#L81: m = append(m, start+pgid(i))
freelist_hmap.go#L98: func (f *freelist) mergeWithExistingSpan(pid pgid) {
freelist_hmap.go#L109: start := prev + 1 - pgid(preSize)
freelist_hmap.go#L112: newStart -= pgid(preSize)
freelist_hmap.go#L125: func (f *freelist) addSpan(start pgid, size uint64) {
freelist_hmap.go#L126: f.backwardMap[start-1+pgid(size)] = size
freelist_hmap.go#L129: f.freemaps[size] = make(map[pgid]struct{})
freelist_hmap.go#L135: func (f *freelist) delSpan(start pgid, size uint64) {
freelist_hmap.go#L137: delete(f.backwardMap, start+pgid(size-1))
freelist_hmap.go#L146: func (f *freelist) init(pgids []pgid) {
freelist_hmap.go#L154: if !sort.SliceIsSorted([]pgid(pgids), func(i, j int) bool { return pgids[i] < pgids[j] }) {
freelist_hmap.go#L159: f.forwardMap = make(map[pgid]uint64)
freelist_hmap.go#L160: f.backwardMap = make(map[pgid]uint64)
node.go#L17: pgid pgid
node.go#L116: func (n *node) put(oldKey, newKey, value []byte, pgid pgid, flags uint32) {
node.go#L597: pgid pgid
page.go#L28: type pgid uint64
page.go#L31: id pgid
page.go#L106: pgid pgid
page.go#L144: type pgids []pgid
tx.go#L30: pages map[pgid]*page
tx.go#L59: tx.pages = make(map[pgid]*page)
tx.go#L423: freed := make(map[pgid]bool)
tx.go#L424: all := make([]pgid, tx.db.freelist.count())
tx.go#L434: reachable := make(map[pgid]*page)
tx.go#L439: reachable[tx.meta.freelist+pgid(i)] = tx.page(tx.meta.freelist)
tx.go#L447: for i := pgid(0); i < tx.meta.pgid; i++ {
tx.go#L458: func (tx *Tx) checkBucket(b *Bucket, reachable map[pgid]*page, freed map[pgid]bool, ch chan error) {
tx.go#L471: for i := pgid(0); i <= pgid(p.overflow); i++ {
tx.go#L521: tx.pages = make(map[pgid]*page)
tx.go#L609: func (tx *Tx) page(id pgid) *page {
tx.go#L622: func (tx *Tx) forEachPage(pgid pgid, depth int, fn func(*page, int)) {
tx.go#L642: } else if pgid(id) >= tx.meta.pgid {
tx.go#L647: p := tx.db.page(pgid(id))
tx.go#L655: if tx.db.freelist.freed(pgid(id)) {