// GetSize returns the Size field if it's non-nil, zero value otherwise.
197944
func (r *ReleaseAsset) GetSize() int {
	if r == nil || r.Size == nil {
		return 0
	}
	return *r.Size
}
810683
func (b *BytePool) Get(size int) []byte {
	switch {
	case size == 0:
		return []byte{}

	case size <= tiny:
		return b.tinySlab.getSlice(size)

	case size <= small:
		return b.smallSlab.getSlice(size)

	case size <= medium:
		return b.mediumSlab.getSlice(size)

	case size <= large:
		return b.largeSlab.getSlice(size)

	case size <= huge:
		return b.hugeSlab.getSlice(size)

	default:
		return make([]byte, size)
	}
}
133972
func GetTermsize() (int, int) {
	ts := termSize{}
	ret, _, _ := syscall.Syscall(
		syscall.SYS_IOCTL,
		uintptr(syscall.Stdin),
		uintptr(syscall.TIOCGWINSZ),
		uintptr(unsafe.Pointer(&ts)),
	)
	if int(ret) == -1 {
		return -1, -1
	}
	return int(ts.Rows), int(ts.Cols)
}
1190244
func (w *Window) GetSize() (width, height int) {
	var wi, h C.int
	C.glfwGetWindowSize(w.data, &wi, &h)
	return int(wi), int(h)
}
307761
func GetSize(imagePath string) (int, int) {
	file, err := os.Open(imagePath)
	defer file.Close()
	if err != nil {
		log.Println(err)
	}

	img, _, err := image.DecodeConfig(file)
	if err != nil {
		log.Println(imagePath, err)
	}

	w := img.Width / 2
	h := img.Height / 2

	return w, h
}
1239019
func GetSize(f *os.File) (ws Size, err error) {
	_, _, ec := syscall.Syscall(syscall.SYS_IOCTL,
		f.Fd(),
		uintptr(TIOCGWINSZ),
		uintptr(unsafe.Pointer(&ws)))

	err = getError(ec)

	if TIOCGWINSZ == 0 && err != nil {
		ws = Size{80, 25, 0, 0}
	}
	return ws, err
}
631015
func (t *Terminal) GetSize() (row, column int, err error) {
	if err = sys.GetWinsize(unix.Stdout, &t.size); err != nil {
		return
	}
	return int(t.size.Row), int(t.size.Col), nil
}
813553
func (t *Terminal) GetSize() (int, int) {
	if err := t.open(); err != nil {
		return 80, 24
	}
	return t.engine.Size()
}
949444
func (d *indirectIndex) Size() uint32 {
	d.mu.RLock()
	defer d.mu.RUnlock()

	return d.b.len()
}
936930
func (f *FileManager) GetSize(c cid.Cid) (int, error) {
	dobj, err := f.getDataObj(c)
	if err != nil {
		return -1, err
	}
	return int(dobj.GetSize_()), nil
}
535494
func (f *Filestore) GetSize(c cid.Cid) (int, error) {
	size, err := f.bs.GetSize(c)
	switch err {
	case nil:
		return size, nil
	case blockstore.ErrNotFound:
		return f.fm.GetSize(c)
	default:
		return -1, err
	}
}
60333
func (b *Bucket) GetSize(refresh bool) (size int64, err error) {
	if refresh {
		b.Refresh()
	}

	var sz int64
	for _, gs := range b.GatherStats("") {
		if len(gs.Stats) > 0 {
			sz, err = strconv.ParseInt(gs.Stats["ep_value_size"], 10, 64)
			if err != nil {
				return 0, err
			}
			size += sz
		}
	}

	return size, nil
}
948884
func GetSize(fd uintptr) *remotecommand.TerminalSize {
	winsize, err := term.GetWinsize(fd)
	if err != nil {
		runtime.HandleError(fmt.Errorf("unable to get terminal size: %v", err))
		return nil
	}

	return &remotecommand.TerminalSize{Width: winsize.Width, Height: winsize.Height}
}
1063340
func (_class HostCrashdumpClass) GetSize(sessionID SessionRef, self HostCrashdumpRef) (_retval int, _err error) {
	_method := "host_crashdump.get_size"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostCrashdumpRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertIntToGo(_method + " -> ", _result.Value)
	return
}
242842
func (s *ReindexService) Size(size int) *ReindexService {
	s.size = &size
	return s
}
1357848
func getMemorySize() (size uint64, err error) {
	var mib []C.int = []C.int{ C.CTL_HW, C.HW_MEMSIZE }
	var value C.int64_t = 0
	var length C.size_t = 8
	var unused unsafe.Pointer

	if rc, errno := C.sysctl(&mib[0], 2, unsafe.Pointer(&value), &length, unused, 0); rc == -1 {
		return 0, fmt.Errorf("unable to get memory size: errno=%d", errno)
	}

	return uint64(value), nil
}
187166
func (s *TranslateFile) size() int64 {
	s.mu.RLock()
	n := s.n
	s.mu.RUnlock()
	return n
}