开发者

Xcode - Malloc_Error in Release and Distribution configuration

开发者 https://www.devze.com 2023-03-01 14:46 出处:网络
I got this error only if I select Release or Distribution configuration on Device, on the Simulator it works well... please, where I mistake?

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 expressi开发者_如何转开发on, 

Thanks for your help! :)


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

  • 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


It looks like you're trying to allocate 429 MB. iPhones don't have that much RAM. I suggest you look at what you're allocating to see why it's so big.

0

精彩评论

暂无评论...
验证码 换一张
取 消