iOS Platform & SwiftUI (50 Qs)•Part 3: Instruments Profiling, App Architecture & Production Hardening (25 - 35)
iOS Memory Management & Out of Memory (OOM) Jetsam Crashes.
senior LevelPerformanceSystem Design
In Simple Words: iOS does not have virtual memory swap space on disk. If physical RAM runs low:
- The OS kernel issues memory pressure warnings (
applicationDidReceiveMemoryWarning). - If memory continues climbing past the hard footprint limit, the kernel's Jetsam daemon terminates the app with
EXC_RESOURCE (RESOURCE_TYPE_MEMORY). - Jetsam crashes do not generate standard crash logs! They are recorded in system diagnostic analytics logs as
jetsamEvent. Mitigate by resizing image buffers downsample-on-decode and releasing heavy in-memory caches.