2010-06-19 82 views
0

当我尝试构建我的应用程序的发布版本时出现此错误。它会抛出一个单一的文件,该文件是相当大的一个错误,但远不及400 + MB(在KBS)iPhone发布内存错误

Out of memory allocating 455627472 bytes after a total of 0 bytes 
Command /Developer/Platforms/iPhoneOS.platform/developerusr/bin/gcc-4.2 failed with exit code 1 

我有3GB可用内存外(out 6GB的),大量的CPU功率和50GB免费的在我的硬盘上。什么可能导致这个问题?

我发现有关该错误的一些额外的信息:

下面是更多的一些信息,我发现有关该错误:

cc1obj(19764) malloc: *** mmap(size=455630848) failed (error code=12) 
*** error: can't allocate region 
*** set a breakpoint in malloc_error_break to debug 

cc1obj: out of memory allocating 455627472 bytes after a total of 0 bytes 
{standard input}:unknown:Undefined local symbol L_objc_msgSendSuper2$stub 
{standard input}:unknown:Undefined local symbol L_objc_msgSend$stub 
{standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_SUP_REFS_$_0 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_26 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_23 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_25 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_5 
{standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_REFERENCES_$_2 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_19 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_16 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_15 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_20 
{standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_REFERENCES_$_5 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_2 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_21 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_24 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_22 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_11 
{standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_REFERENCES_$_4 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_12 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_13 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_14 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_18 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_17 
{standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_10 
Command /Developer3.1Final/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 

回答

0

如果这是在实际构建过程中,那么我的猜测是您的Mac需要重新启动或重新安装Xcode。你永远不需要这么多的RAM来编译,所以它会递归或相似。我怀疑你可以编写一些代码,除非gcc出现问题。

0

NM,没看出来是cc2obj已经死了。

0

我已经看到了这一点,它不是一个实际的内存错误...

正在发生的事情是,你有你的Xcode目标生成设置要么释放或调试和“优化级别”的特定设置设置为快速,或更快,或最快..

似乎有一个错误在那里的某个地方,将其设置为无,或尝试操作系统,或O3(我不认为最快的影响)..

这很可能会解决某些遇到此线程的问题。肯定先尝试“无”首先...这将确认这是发生在某人的情况下,看到这...

我可以告诉麦克拉格玛肯定有这个问题,因为他/她描述改变从调试到发布,并且这导致它(调试已经被设置为无)并且发布被设置为别的东西......当情况是这样的...确定它是特定的构建设置...