IOS NSAllocateMemoryPages failed to raise - [NSData dataWithBytes: length:]

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** NSAllocateMemoryPages(10969344) failed'

I have seen this exception several times, but not reproducibly. From the crash report, I know that it crashed after - [NSData dataWithBytes:] of this line. I was looking for an answer, but I could not find 100% convincing for me.

  • Could this be caused by an attempt to allocate memory and exceed the heap memory limit?
  • If so, how can I solve this problem, in addition to optimizing the overall memory management of the application?
  • If not, what cannot cause this crash?

Thank!!

+4
source share

Source: https://habr.com/ru/post/1682095/


All Articles