未验证 提交 cfbba55c 编写于 作者: W will-jl944 提交者: GitHub

fis the issue in function _get_shared_memory_size_in_M in the case of that...

fis the issue in function _get_shared_memory_size_in_M in the case of that there are multiple 'shm' space (#2434)
上级 c8e4a3d7
文件已添加
......@@ -58,10 +58,10 @@ def _get_shared_memory_size_in_M():
elif len(shm_infos) == 1:
return _parse_size_in_M(shm_infos[0][3])
else:
shm_infos = [si for si in shm_infos \
if si[-1] == SHM_DEFAULT_MOUNT]
if len(shm_infos) == 0:
return _parse_size_in_M(shm_infos[0][3])
default_mount_infos = [
si for si in shm_infos if si[-1] == SHM_DEFAULT_MOUNT
]
if default_mount_infos:
return _parse_size_in_M(default_mount_infos[0][3])
else:
return max([_parse_size_in_M(si[3]) \
for si in shm_infos])
return max([_parse_size_in_M(si[3]) for si in shm_infos])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册