It is my understanding that pages in memory containing things like program text and shared libraries that have associated real world files will actually map to that associated file instead of swap (i.e. map to something like a segment of /usr/bin/ls). Therefore when the kernel frees up memory it doesn't need to copy those pages to swap since they can be copied back into memory from the associated file when a page fault occurs.
As a result we only use swap space for anonymous pages (i.e. pages in memory that are not associated with some real world file). Given this fact, I would assume a large portion of memory pages will never need to be copied to swap space because they are just copied into memory directly from the associated real world file as needed. So, my question is this: why does hibernation require a swap space roughly equal to our total system memory when a large portion of those memory pages don't map to swap space at all?