码迷,mamicode.com
首页 > 系统相关 > 详细

[Linux]进程——用户态编程相关

时间:2014-10-26 09:05:16      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:blog   http   ar   strong   sp   div   on   art   log   

1,设定进程的最大资源

 

[cpp] view plaincopy
 
  1. struct rlimit rlim;  
  2. rlim.rlim_cur = 8192;  
  3. rlim.rlim_max = 8192;  
  4. if (setrlimit(RLIMIT_NOFILE, &rlim)) {  
  5.         ERROR("Error setting RLIMIT_NOFILE, errno = %d\n", errno);  
  6.     }  

[Linux]进程——用户态编程相关

标签:blog   http   ar   strong   sp   div   on   art   log   

原文地址:http://www.cnblogs.com/zhiliao112/p/4051377.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!