code: func (f *freelist) read(p *page) {
  	// If the page.count is at the max uint16 value (64k) then it's considered
  	// an overflow and the size of the freelist is stored as the first element.
  	idx, count := 0, int(p.count)
  	if count == 0xFFFF {
  		idx = 1
  		count = int(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0])
  	}
  
  	// Copy the list of page ids from the freelist.
  	if count == 0 {
  		f.ids = nil
  	} else {
  		ids := ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[idx:count]
  		f.ids = make([]pgid, len(ids))
  		copy(f.ids, ids)
  
  		// Make sure they're sorted.
  		sort.Sort(pgids(f.ids))
  	}
  
  	// Rebuild the page cache.
  	f.reindex()
  }
docs: // read initializes the freelist from a freelist page.