If I were your systems architect or manager you'd have to have a
pretty compelling reason to do this. It is generally best to leave
memory management to the memory manager. If your system is
experiencing memory pressure severe enough to force your pages out,
even though they are being frequently accessed, then locking your
pages in is only going to make matters worse for other processes.
If your application really cannot tolerate waiting for a page-in,
then move enough other processes out of a CPU of your choice
such that they will remain "natually" resident and run your process
there.
Memory, like CPU, is a shared resource that should not monopolized.
Oz
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?