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

pull/667/head
Yang Gao 11 months ago committed by GitHub
parent 80aea0b09c
commit 6276627ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,7 +101,7 @@ function proc(params: Parameter): Cmd {
clockLimit: 3 * cpuLimit, clockLimit: 3 * cpuLimit,
memoryLimit: Math.floor(memory * 1024 * 1024), memoryLimit: Math.floor(memory * 1024 * 1024),
strictMemoryLimit: getConfig('strict_memory'), strictMemoryLimit: getConfig('strict_memory'),
// stackLimit: memory * 1024 * 1024, stackLimit: getConfig('strict_memory') ? Math.floor(memory * 1024 * 1024) : 0,
procLimit: params.processLimit || getConfig('processLimit'), procLimit: params.processLimit || getConfig('processLimit'),
copyOutMax: Math.floor(1024 * 1024 * stdioLimit * 3), copyOutMax: Math.floor(1024 * 1024 * stdioLimit * 3),
copyIn, copyIn,

Loading…
Cancel
Save