How to restrict memory use for memory mapped files
I am organizing a competition for my students. It is external sorting challenge. The target language is Java. When I restrict jvm memory in command line it still allows students to use arbitrary many megs of RAM when using memory mapped files. Is there any linux tool to restrict 开发者_运维问答a memory use for that? Thanks in advance for help!
The tool is called ulimit
. It sets the limit for the current shell and processes started by it, e.g.:
# ulimit -v 200000
More info can be found in the man pages of sh
.
精彩评论