Add memory limit set

Don't know why we missed that.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2015-07-07 09:20:51 +08:00
parent 5ec11a2918
commit 2539d53896
1 changed files with 1 additions and 0 deletions

View File

@ -242,6 +242,7 @@ func createCgroupConfig(spec *specs.LinuxSpec, devices []*configs.Device) (*conf
AllowedDevices: append(devices, allowedDevices...),
}
r := spec.Linux.Resources
c.Memory = r.Memory.Limit
c.MemoryReservation = r.Memory.Reservation
c.MemorySwap = r.Memory.Swap
c.KernelMemory = r.Memory.Kernel