Xcode-发布和分发配置中的Malloc_Error [英] Xcode - Malloc_Error in Release and Distribution configuration

查看:151
本文介绍了Xcode-发布和分发配置中的Malloc_Error的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅当我选择设备"上的发行版"或发行版"配置时,才出现此错误,在Simulator上它运行良好...请在哪里我出错了?

I got this error only if I select Release or Distribution configuration on Device, on the Simulator it works well... please, where I mistake?

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

cc1obj: out of memory allocating 429376832 bytes after a total of 0 bytes
{standard input}:13160:non-relocatable subtraction expression, 

感谢您的帮助! :)

推荐答案

可能是因为您的模拟器能够分配〜500Mb的内存,而您的iPhone无法做到这一点.我认为您应该重新考虑自己在做什么

Probably because your simulator is able to allocate ~500Mb of memory while your iPhone is not able to do it. I think you should rethink what you are doing

  • 您真的需要那么多内存吗?
  • 这不仅仅是一个计算错误吗? (可能是错误的sizeof等)
  • 无论如何,这确实是太多数据无法处理
  • do you really need so much memory?
  • isn't it just a calculating bug? (maybe a wrong sizeof or whatever)
  • in any case this is really too much data to be handled

这篇关于Xcode-发布和分发配置中的Malloc_Error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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