I ran into an odd out-of-memory problem the other day when attempting to debug an iOS app on device. The app consistently crashed shortly after launch, preventing me from investigating the bug. To unblock myself, I learned a lot about the iOS virtual memory implementation and journaled my findings (including a fix!) here.
Nothing to add – exactly what it says on the tin.
I didn’t realize is that IOS doesn’t support using virtual memory for application swapping…
I’m guessing this has to do with apple’s aggressive stance against background applications on IOS. Any time swapping would be beneficial the application gets killed instead, nullifying the need to swap.
Anyway, the author’s problem had more to do with IOS address space limits than available memory. He solved his application’s allocation error by granting his application “Extended Virtual Addressing” permission, which overrides the default IOS virtual memory limits (ie 7.3GB usable on iphone xs/13).