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 }