Xcode4 Xcode链接器错误:can';不分配区域

Xcode4 Xcode链接器错误:can';不分配区域,xcode4,linker,Xcode4,Linker,我想在iPad2上运行应用程序,但在链接时出现以下错误: collect2: ld terminated with signal 6 [Abort trap] ld(69392) malloc: *** mmap(size=16777216) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug terminate called aft

我想在iPad2上运行应用程序,但在链接时出现以下错误:

collect2: ld terminated with signal 6 [Abort trap]
ld(69392) malloc: *** mmap(size=16777216) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'std::bad_alloc'
what():  std::bad_alloc

我不知道这个错误的原因是什么。看起来像是分配了16777216字节(16MB),iPad2应该可以处理这个问题

您确定在链接时出错,并且没有成功链接、安装并开始运行,然后收到错误吗

您所犯的错误是因为malloc无法分配另一个16M块,这几乎可以肯定是因为您有疯狂的内存碎片(可能,但不太常见)或内存泄漏(非常常见!)


在linker/XCode工具中看到这种情况会很奇怪(除非您运行的是betaware,在这种情况下谁知道呢?!),它更可能出现在您的应用程序中。

我也遇到过类似的问题,但没有收到内存不足通知。你知道为什么吗?