cc1plus:虚拟内存耗尽 [英] cc1plus: Virtual memory exhausted

查看:773
本文介绍了cc1plus:虚拟内存耗尽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在QNX Momentics IDE(4.6)中使用qcc在Linux中建立一个项目。我无法成功的构建过程与以下错误:

I am trying to build a project in QNX Momentics IDE (4.6) using qcc in Linux. I fail to succeed the build process with the following error:

virtual memory exhausted: Cannot allocate memory
/opt/qnx641/host/linux/x86/usr/lib/gcc/i386-pc-nto-qnx6.4.0/4.3.3/cc1plus error 1

项目有一个超过1.3 MLOC的cpp文件。这一个是来自大型Matlab / SIMULINK仿真模型的自动生成的代码,因此不容易分割和征服。

The project has a cpp file with more than 1.3 MLOC. This one is an autogenerated code from a large Matlab/SIMULINK simulation model so it is not easy to divide and conquer.

很难理解它是qcc编译器的LOC限制还是由于在自动生成的代码中的编程习惯。

It is hard to understand if it is LOC limit of qcc compiler or due to a programming practice in the autogenerated code.

我想问:


  • 是否有任何来源档案大小限制

  • 任何建议修复虚拟内存耗尽
  • code> cc1plus的问题?
  • Is there any source file size limit for qcc?
  • What are the bad programming practices that cause this?
  • Any suggestions to fix virtual memory exhausted problem of cc1plus?

推荐答案

Q1:有任何源文件大小qcc的限制?
A1:qcc = gcc。更准确地说:qcc是一个轻量级的包装器,调用gcc;所有的真正的工作是由gcc。 GNU软件,作为一般的哲学,旨在不强加任意限制,我认为这是特别是对gcc。即使存在任意限制,你也不会击中那些,因为你的系统内存不足。
随机链接:
预处理器限制: http:// gcc .gnu.org / onlinedocs / cpp / Implementation-limits.html
一些gcc限制基准化: gcc模块大小限制

Q1: Is there any source file size limit for qcc? A1: qcc = gcc. More accurately: qcc is a lightweight wrapper that calls gcc; all the real work is done by gcc. GNU software is, as a general philosophy, designed to not impose arbitrarily limit and I presume this is especially true for gcc. Even if there exist arbitrarily limits you are not hitting those because you are running out of system memory. Random links: preprocessor limits: http://gcc.gnu.org/onlinedocs/cpp/Implementation-limits.html some gcc limits benchmarking: gcc module size limits

Q2:有什么坏的编程实践导致这个?
A2:例如,将所有源代码转储到单个文件中,如您演示的。我会说这个问题与你的情况不相关,因为你已经说你不能控制生成的代码。

Q2: What are the bad programming practices that cause this? A2: E.g., dumping all source code into a single file, as you demonstrated. I'd say this question is not relevant to your case because you already stated you don't have control over the generated code.

Q3:任何建议修复虚拟内存耗尽了cc1plus的问题?
A3:a)把更多的ram放入你的主机(可能或可能不会取决于你有多少,如果你的操作系统是32或64位); b)增加你的交换空间(同样适用); c)如果a / b不帮助,然后将您的操作系统升级到64位,然后再次尝试a / b。不幸的是,这64位的建议几乎肯定不适用于QNX随6.4.1提供的gcc版本。

Q3: Any suggestions to fix virtual memory exhausted problem of cc1plus? A3: a) put more ram into your host computer (may or may not help depending on how much you have and if your OS is 32 or 64 bit); b)increase your swap-space (same applies); c) if a/b does not help then upgrade your OS to 64 bit and try a/b again. Unfortunately, this 64-bit suggestion almost surely does not apply to the gcc version that QNX shipped with 6.4.1. Maybe not even to the latest one.

作为一般建议,由于qcc使用gcc,我建议您使用主机的gcc(gcc)创建相同的代码与您的Linux一起提供)。一旦工作,你可能开始寻找差异,这可能归结为64位支持。

As a general suggestion, since qcc is using gcc I'd recommend that you have the same code build using the host's gcc (gcc that is shipped with your Linux). Once that works you may start looking for the differences, which likely boil down to 64-bit support.

这篇关于cc1plus:虚拟内存耗尽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆