MCPcopy Create free account
hub / github.com/containerd/cgroups / getOomControlValue

Function getOomControlValue

cgroup1/memory.go:453–462  ·  view source on GitHub ↗
(mem *specs.LinuxMemory)

Source from the content-addressed store, hash-verified

451}
452
453func getOomControlValue(mem *specs.LinuxMemory) *int64 {
454 if mem.DisableOOMKiller != nil && *mem.DisableOOMKiller {
455 i := int64(1)
456 return &i
457 } else if mem.DisableOOMKiller != nil && !*mem.DisableOOMKiller {
458 i := int64(0)
459 return &i
460 }
461 return nil
462}
463
464func (m *memoryController) memoryEvent(path string, event MemoryEvent) (uintptr, error) {
465 root := m.Path(path)

Callers 2

Test_getOomControlValueFunction · 0.85
getMemorySettingsFunction · 0.85

Calls

no outgoing calls

Tested by 1

Test_getOomControlValueFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…