MCPcopy
hub / github.com/NVIDIA/aistore / apiReqAlloc

Function apiReqAlloc

ais/htcommon.go:746–757  ·  view source on GitHub ↗
(after int, prefix []string, useDpq bool)

Source from the content-addressed store, hash-verified

744)
745
746func apiReqAlloc(after int, prefix []string, useDpq bool) (a *apiRequest) {
747 if v := apiReqPool.Get(); v != nil {
748 a = v.(*apiRequest)
749 } else {
750 a = &apiRequest{}
751 }
752 a.after, a.prefix = after, prefix
753 if useDpq {
754 a.dpq = dpqAlloc()
755 }
756 return a
757}
758
759func apiReqFree(a *apiRequest) {
760 if a.dpq != nil {

Callers 15

_parseReqTryMethod · 0.85
httpobjgetMethod · 0.85
httpobjputMethod · 0.85
httpbckdeleteMethod · 0.85
httpobjpostMethod · 0.85
httpbckheadMethod · 0.85
httpbckpatchMethod · 0.85
httpbckdeleteMethod · 0.85
httpbckpostMethod · 0.85
httpbckheadMethod · 0.85
httpobjgetMethod · 0.85
httpobjputMethod · 0.85

Calls 2

dpqAllocFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected