开发者

Limiting RAM usage for program executed through shell script

开发者 https://www.devze.com 2023-02-04 00:13 出处:网络
I开发者_如何学编程 need to limit the memory(RAM) usage of a program to just 100mb. I am executing a batch of them using a shell script and wanted to know how to do that.

I开发者_如何学编程 need to limit the memory(RAM) usage of a program to just 100mb. I am executing a batch of them using a shell script and wanted to know how to do that. I am compiling from source of my class and then storing the real run time using the time command. Just wanted to know how to limit the memory usage of each to 100mb.


You can play around with ulimit -m. Type help ulimit and/or type ulimit -a to get a full list

0

精彩评论

暂无评论...
验证码 换一张
取 消