Clarify comment around memswap & memory

pull/677/head
yuvipanda 2019-05-08 09:44:58 -07:00
rodzic 2eb4781c2e
commit 74fc378230
2 zmienionych plików z 8 dodań i 6 usunięć

Wyświetl plik

@ -530,9 +530,10 @@ class BuildPack:
"integer but is '{}'".format(type(memory_limit)))
limits = {}
if memory_limit:
# We'd like to always disable swap but all we can do is set the
# total amount. This means we only limit it when the caller set
# a memory limit
# We want to always disable swap. Docker expects `memswap` to
# be total allowable memory, *including* swap - while `memory`
# points to non-swap memory. We set both values to the same so
# we use no swap.
limits = {
'memory': memory_limit,
'memswap': memory_limit

Wyświetl plik

@ -28,9 +28,10 @@ class DockerBuildPack(BuildPack):
"integer but is '{}'".format(type(memory_limit)))
limits = {}
if memory_limit:
# We'd like to always disable swap but all we can do is set the
# total amount. This means we onnly limit it when the caller set
# a memory limit
# We want to always disable swap. Docker expects `memswap` to
# be total allowable memory, *including* swap - while `memory`
# points to non-swap memory. We set both values to the same so
# we use no swap.
limits = {
'memory': memory_limit,
'memswap': memory_limit,