mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: add strictMemory setting
This commit is contained in:
1 parent
b61debc039
commit
c67e2b85e3
4 files changed
+8
-1
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.10.7",
|
"version": "2.10.8",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ disable:
|
|||||||
name: disable
|
name: disable
|
||||||
desc: Disable builtin judge
|
desc: Disable builtin judge
|
||||||
default: false
|
default: false
|
||||||
|
strict_memory:
|
||||||
|
type: boolean
|
||||||
|
name: strict_memory
|
||||||
|
desc: Strict Memory Mode
|
||||||
|
default: false
|
||||||
env:
|
env:
|
||||||
type: textarea
|
type: textarea
|
||||||
name: env
|
name: env
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ let config = {
|
|||||||
tmpfs_size: '256m',
|
tmpfs_size: '256m',
|
||||||
stdio_size: '32m',
|
stdio_size: '32m',
|
||||||
memoryMax: '512m',
|
memoryMax: '512m',
|
||||||
|
strict_memory: false,
|
||||||
retry_delay_sec: 15,
|
retry_delay_sec: 15,
|
||||||
sandbox_host: 'http://localhost:5050',
|
sandbox_host: 'http://localhost:5050',
|
||||||
testcases_max: 100,
|
testcases_max: 100,
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ function proc({
|
|||||||
cpuLimit: time * 1000 * 1000 * rate,
|
cpuLimit: time * 1000 * 1000 * rate,
|
||||||
realCpuLimit: time * 3000 * 1000 * rate,
|
realCpuLimit: time * 3000 * 1000 * rate,
|
||||||
memoryLimit: memory * 1024 * 1024,
|
memoryLimit: memory * 1024 * 1024,
|
||||||
|
strictMemoryLimit: getConfig('strict_memory'),
|
||||||
// stackLimit: memory * 1024 * 1024,
|
// stackLimit: memory * 1024 * 1024,
|
||||||
procLimit: process_limit,
|
procLimit: process_limit,
|
||||||
copyIn,
|
copyIn,
|
||||||
|
|||||||
Reference in new issue
Block a user