judge: Math.floor(time&mem)

This commit is contained in:
undefined committed 2021-08-15 19:06:54 +08:00
1 parent c67e2b85e3
commit 437df2391a
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@hydrooj/hydrojudge",
"bin": "bin/hydrojudge.js",
"version": "2.10.8",
"version": "2.10.9",
"main": "package.json",
"author": "undefined <i@undefined.moe>",
"repository": "https://github.com/hydro-dev/Hydro.git",
+5 -5
View File
@@ -40,12 +40,12 @@ function proc({
env: getConfig('env').split('\n'),
files: [
stdin ? { src: stdin } : { content: '' },
{ name: 'stdout', max: 1024 * 1024 * size },
{ name: 'stderr', max: 1024 * 1024 * size },
{ name: 'stdout', max: Math.floor(1024 * 1024 * size) },
{ name: 'stderr', max: Math.floor(1024 * 1024 * size) },
],
cpuLimit: time * 1000 * 1000 * rate,
realCpuLimit: time * 3000 * 1000 * rate,
memoryLimit: memory * 1024 * 1024,
cpuLimit: Math.floor(time * 1000 * 1000 * rate),
realCpuLimit: Math.floor(time * 3000 * 1000 * rate),
memoryLimit: Math.floor(memory * 1024 * 1024),
strictMemoryLimit: getConfig('strict_memory'),
// stackLimit: memory * 1024 * 1024,
procLimit: process_limit,