应该使用virtual memory functions:<br><br>VirtualAlloc -- Reserves or commits a region of pages in the virtual<br> address space of the calling process.<br>VirtualLock -- Locks the specified region of the process's virtual<br> address space into physical memory, ensuring that <br> subsequent access to the region will not incur a page fault.<br>VirtualUnlock -- Unlocks a specified range of pages in the virtual address<br> space of a process, enabling the system to swap the pages<br> out to the paging file if necessary. <br>VirtualFree -- releases, decommits, or releases and decommits a region of <br> pages within the virtual address space of the calling process. <br><br>我向 VirtialLock 提供的保证是你想要的。<br>细节可以参考MSDN -- virtual memory。<br>