Merge pull request #589 from nekto0n/master

Lower number of allocation in freelist.reindex()
pull/24/head
Ben Johnson 2016-09-05 15:54:03 -06:00 committed by GitHub
commit 1561ab171f
1 changed files with 1 additions and 1 deletions

View File

@ -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
}