MCPcopy Create free account
hub / github.com/containerd/nerdctl / getCgroupMemLimit

Function getCgroupMemLimit

pkg/statsutil/stats_linux.go:87–92  ·  view source on GitHub ↗
(memLimit float64)

Source from the content-addressed store, hash-verified

85}
86
87func getCgroupMemLimit(memLimit float64) float64 {
88 if memLimit == float64(^uint64(0)) {
89 return getHostMemLimit()
90 }
91 return memLimit
92}
93
94func getHostMemLimit() float64 {
95 file, err := os.Open("/proc/meminfo")

Callers 2

SetCgroupStatsFieldsFunction · 0.85
SetCgroup2StatsFieldsFunction · 0.85

Calls 1

getHostMemLimitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…