aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--freelist.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/freelist.go b/freelist.go
index 1b7ba91..d32f6cd 100644
--- a/freelist.go
+++ b/freelist.go
@@ -236,7 +236,7 @@ func (f *freelist) reload(p *page) {
// reindex rebuilds the free cache based on available and pending free lists.
func (f *freelist) reindex() {
- f.cache = make(map[pgid]bool)
+ f.cache = make(map[pgid]bool, len(f.ids))
for _, id := range f.ids {
f.cache[id] = true
}