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

Method Create

cgroup1/memory.go:202–210  ·  view source on GitHub ↗
(path string, resources *specs.LinuxResources)

Source from the content-addressed store, hash-verified

200}
201
202func (m *memoryController) Create(path string, resources *specs.LinuxResources) error {
203 if err := os.MkdirAll(m.Path(path), defaultDirPerm); err != nil {
204 return err
205 }
206 if resources.Memory == nil {
207 return nil
208 }
209 return m.set(path, getMemorySettings(resources))
210}
211
212func (m *memoryController) Update(path string, resources *specs.LinuxResources) error {
213 if resources.Memory == nil {

Callers

nothing calls this directly

Calls 3

PathMethod · 0.95
setMethod · 0.95
getMemorySettingsFunction · 0.85

Tested by

no test coverage detected