page retrieves a page reference from the mmap based on the current page size.
(id common.Pgid)
| 1128 | |
| 1129 | // page retrieves a page reference from the mmap based on the current page size. |
| 1130 | func (db *DB) page(id common.Pgid) *common.Page { |
| 1131 | pos := id * common.Pgid(db.pageSize) |
| 1132 | return (*common.Page)(unsafe.Pointer(&db.data[pos])) |
| 1133 | } |
| 1134 | |
| 1135 | // pageInBuffer retrieves a page reference from a given byte array based on the current page size. |
| 1136 | func (db *DB) pageInBuffer(b []byte, id common.Pgid) *common.Page { |
no test coverage detected