*** error: can't allocate region

Posted on 2012-03-13 23:34  无忧consume  阅读(949)  评论(0编辑  收藏  举报

  error can't allocate region 程序运行报错,在xcode中则会发出“SIGABRT”信号来终止程序。

  原因是程序运行内存不足,欲申请空间得不到分配。此时可以查找程序是否出现程序一直申请内存,出现死循环。SIGABRT 程序自己发现错误并调用abort来终止程序。可能是程序没有内存可分配导致,运行终止.  

  The error you have is because malloc can't allocate another 16M block, and THAT is almost certainly because you have either crazy memory fragmentation (possible, but not as common) or a memory leak (very common!)

  it would be odd to see this coming form the linker/XCode tools (unless you're running betaware, in which case who knows?!) It's more likely in your app.

  出现这种错误,一种可能是内存泄露,或是编码出现出现重复申请空空间,但是最终嗾使造成内存不足,出现这种错误,因此在出错地方看看是不是有这种错误,或是其他地方找找有没有内存泄露的。

Copyright © 2024 无忧consume
Powered by .NET 8.0 on Kubernetes