This may have a different answer between OSX, Windows and Linux.
If the process crashes, will dirtied pages from the mmap be discarded or written out eventually by the OS, assuming it does not crash?
It's clear that they persist if another process has mapped them, but what if the crashed process was the only one? I'm interested both in what is technically promised in docs and what the implementation actually does. If you only know for one OS please respond for just that one.