Merge pull request #589 from nekto0n/master

Lower number of allocation in freelist.reindex()
This commit is contained in:
Ben Johnson 2016-09-05 15:54:03 -06:00 committed by GitHub
commit 1561ab171f

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
}