Which is why I said "allocate and pin". POSIX systems have mlock()/mlockall() to prefault allocated memory and prevent it from being paged out.
(I understand that mlock prevents paging-out, but in my mind that's a separate concern from pre-faulting?)