Which is why I said "allocate and pin". POSIX systems have mlock()/mlockall() to prefault allocated memory and prevent it from being paged out.
Random curious person here: does mlock() itself cause the pre-fault? Or do you have to scribble over that memory yourself, too?
(I understand that mlock prevents paging-out, but in my mind that's a separate concern from pre-faulting?)
Aha, my apologies, I overlooked that.
Random curious person here: does mlock() itself cause the pre-fault? Or do you have to scribble over that memory yourself, too?
(I understand that mlock prevents paging-out, but in my mind that's a separate concern from pre-faulting?)