We've seen cases in practice where Realm files have grown so large that they cannot be mmapped in their entirety all at once, which leaves users with very few options to recover that data.
Now that we officially expose compact() in Cocoa's public API (realm/realm-swift#4755), that provides for an escape hatch for some Realms to be shrunk to a size that can be mmapped.
So if mmapping the file in its entirety fails, core could incrementally just map the section it cares about at a given time, read the required data from it, unmap it, then move on to the next section.