judge: add limit to stack when strict_memory enabled (#681)

This commit is contained in:
Yang Gao authored and GitHub committed 2023-10-30 06:23:44 +08:00
1 parent 80aea0b09c
commit 6276627ee1
1 file changed
+1 -1
+1 -1
View File
@@ -101,7 +101,7 @@ function proc(params: Parameter): Cmd {
clockLimit: 3 * cpuLimit,
memoryLimit: Math.floor(memory * 1024 * 1024),
strictMemoryLimit: getConfig('strict_memory'),
// stackLimit: memory * 1024 * 1024,
stackLimit: getConfig('strict_memory') ? Math.floor(memory * 1024 * 1024) : 0,
procLimit: params.processLimit || getConfig('processLimit'),
copyOutMax: Math.floor(1024 * 1024 * stdioLimit * 3),
copyIn,