MCPcopy
hub / github.com/opencontainers/runc / notifyMemoryPressure

Function notifyMemoryPressure

libcontainer/notify_linux.go:73–84  ·  view source on GitHub ↗
(dir string, level PressureLevel)

Source from the content-addressed store, hash-verified

71}
72
73func notifyMemoryPressure(dir string, level PressureLevel) (<-chan struct{}, error) {
74 if dir == "" {
75 return nil, errors.New("memory controller missing")
76 }
77
78 if level > CriticalPressure {
79 return nil, fmt.Errorf("invalid pressure level %d", level)
80 }
81
82 levelStr := []string{"low", "medium", "critical"}[level]
83 return registerMemoryEvent(dir, "memory.pressure_level", levelStr)
84}

Callers 2

NotifyMemoryPressureMethod · 0.85
TestNotifyMemoryPressureFunction · 0.85

Calls 1

registerMemoryEventFunction · 0.85

Tested by 1

TestNotifyMemoryPressureFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…