mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: fix memory unit
This commit is contained in:
1 file changed
+1
-1
@@ -128,7 +128,7 @@ async function adaptResult(result: SandboxResult, params: Parameter): Promise<Sa
|
||||
if (ret.time > (params.time || 16000)) {
|
||||
ret.status = STATUS.STATUS_TIME_LIMIT_EXCEEDED;
|
||||
}
|
||||
if (ret.memory > (params.memory || parseMemoryMB(getConfig('memoryMax')))) {
|
||||
if (ret.memory > 1024 * (params.memory || parseMemoryMB(getConfig('memoryMax')))) {
|
||||
ret.status = STATUS.STATUS_MEMORY_LIMIT_EXCEEDED;
|
||||
}
|
||||
const outname = params.filename ? `${params.filename}.out` : 'stdout';
|
||||
|
||||
Reference in new issue
Block a user