免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3877 | 回复: 2

今天用到了控制gcc内存使用的参数 [复制链接]

论坛徽章:
0
发表于 2011-07-27 22:39 |显示全部楼层
在一些特殊环境中需要用到这些参数,否则gcc拼命申请内存
  1.           ggc-min-expand
  2.                GCC uses a garbage collector to manage its own memory alloca-
  3.                tion.  This parameter specifies the minimum percentage by which
  4.                the garbage collector’s heap should be allowed to expand
  5.                between collections.  Tuning this may improve compilation
  6.                speed; it has no effect on code generation.

  7.                The default is 30% + 70% * (RAM/1GB) with an upper bound of
  8.                100% when RAM >= 1GB.  If "getrlimit" is available, the notion
  9.                of "RAM" is the smallest of actual RAM and "RLIMIT_DATA" or
  10.                "RLIMIT_AS".  If GCC is not able to calculate RAM on a particu-
  11.                lar platform, the lower bound of 30% is used.  Setting this
  12.                parameter and ggc-min-heapsize to zero causes a full collection
  13.                to occur at every opportunity.  This is extremely slow, but can
  14.                be useful for debugging.

  15.            ggc-min-heapsize
  16.                Minimum size of the garbage collector’s heap before it begins
  17.                bothering to collect garbage.  The first collection occurs
  18.                after the heap expands by ggc-min-expand% beyond ggc-min-heap-
  19.                size.  Again, tuning this may improve compilation speed, and
  20.                has no effect on code generation.
复制代码

论坛徽章:
0
发表于 2011-07-28 00:04 |显示全部楼层
mark

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
发表于 2011-07-28 00:28 |显示全部楼层
还有这个事情,挺新鲜的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP