Comments (2)
另外想请教一下,我用judger跑一个go程序测试,首先不做限制,judger给出其memory值假设为X,之后我将10 * X作为--max_memory参数,由于memory限制go程序跑不起来,想问问为什么setrlimit设置的资源限制和wait4统计的资源有这么大差异呢?另外同样的测试在C/C++程序上是没问题的
from judger.
-
为了避免代码是正确的,但是因为超过内存 oom 而被判定为 re。如果程序占用低于两倍,最后再重新检查内存占用和配置的关系,就可以判定为超内存而不是 re,如果超过两倍,那就真的 re 了(可能会被 kill)。
-
对于 go / Java 等带虚拟机的高级一些的语言,因为它们会根据物理内存来预先分配内存而无法感知到存在内存限制,导致分配失败(Java 新版可以感知到 cgroup,但是这里并没用这个技术)。直接限制就会导致一些无法启动的问题。
建议使用memory_limit_check_only
,也就是不实际进行内存限制,而是只看最终内存使用的数字来判定结果,和问题 1 也有些关系。
from judger.
Related Issues (20)
- Judger的文档网站挂了 HOT 1
- M1 无法正常运行沙盒 HOT 4
- 运行demo时,result=4,请问大佬有解决办法么? HOT 2
- 你好,这个 OJ 要怎么用? HOT 1
- 有没有办法可以给远程进程安装seccomp-filter? HOT 2
- Tip: use native executable with Java JNI
- Wrong Answer because of last blank in the printf HOT 2
- 一个用go调用judger.so的第三方库
- Run judger on alpine linux container (for cloud environments) HOT 3
- Question: Do we really need root user privileges to run this Judger?
- 对于 python 文件运行,有没有对应的规则程序,现在使用c_cpp会报"signal": 31
- 关于rusage的值
- 如果你正在被设置seccomp所困扰 HOT 1
- libseccomp seems to be not working as expected
- 编译报错 HOT 3
- Problem while building module in nodejs HOT 3
- Import pandas, scipy, numpy
- Arm64 需要额外的系统调用 HOT 1
- Stack Trace is missing for Result- 4 [Runtime Error] for C and CPP languages HOT 1
- go 语言沙箱编译资源报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from judger.