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

Method growSize

db.go:1263–1271  ·  view source on GitHub ↗
(mmapSize, growSize int)

Source from the content-addressed store, hash-verified

1261}
1262
1263func (db *DB) growSize(mmapSize, growSize int) int {
1264 // If the data is smaller than the alloc size then only allocate what's needed.
1265 // Once it goes over the allocation size then allocate in chunks.
1266 if mmapSize <= db.AllocSize {
1267 return mmapSize
1268 } else {
1269 return growSize + db.AllocSize
1270 }
1271}
1272
1273func (db *DB) IsReadOnly() bool {
1274 return db.readOnly

Callers 2

allocateMethod · 0.95
growMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected