()
| 598 | } |
| 599 | |
| 600 | func (a *pageRefAllocator) newPageRef() *pageRef { |
| 601 | if a.head == len(a.refs) { |
| 602 | a.refs = make([]pageRef, a.size) |
| 603 | a.head = 0 |
| 604 | } |
| 605 | ref := &a.refs[a.head] |
| 606 | a.head++ |
| 607 | return ref |
| 608 | } |
| 609 | |
| 610 | func seek(cursor, limit, offset int64, whence int) (int64, error) { |
| 611 | switch whence { |