aboutsummaryrefslogtreecommitdiff
path: root/freelist.go
diff options
context:
space:
mode:
Diffstat (limited to 'freelist.go')
-rw-r--r--freelist.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/freelist.go b/freelist.go
index ebe2810..6c527fe 100644
--- a/freelist.go
+++ b/freelist.go
@@ -1,6 +1,7 @@
package bolt
import (
+ "fmt"
"sort"
"unsafe"
)
@@ -63,7 +64,7 @@ func (f *freelist) free(txid txid, p *page) {
}
f.pending[txid] = ids
- // DEBUG ONLY: f.check()
+ f.check() // DEBUG ONLY:
}
// release moves all page ids for a transaction id (or older) to the freelist.
@@ -114,7 +115,6 @@ func (f *freelist) write(p *page) {
// check verifies there are no double free pages.
// This is slow so it should only be used while debugging.
// If errors are found then a panic invoked.
-/*
func (f *freelist) check() {
var lookup = make(map[pgid]txid)
for _, id := range f.ids {
@@ -132,7 +132,6 @@ func (f *freelist) check() {
}
}
}
-*/
type reverseSortedPgids []pgid