我可以告诉Windows不要换出一个特定的过程的记忆? [英] Can I tell Windows not to swap out a particular processes’ memory?

查看:195
本文介绍了我可以告诉Windows不要换出一个特定的过程的记忆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来告诉Windows,它不应该换出一个特定的进程内存到磁盘?

Is there a way to tell Windows that it shouldn't swap out a particular processes' memory to disk?

它的一个.net窗口服务,相当大的内存使用情况。我得到了很多的物理内存但操作系统似乎推动这一进程的内存页面文件的一部分呢。

Its a .Net windows service with fairly large memory usage. I got lot of physical RAM but the OS seems to move part of the process memory to the pagefile anyway.

推荐答案

您可以使用的 VirtualLock 以prevent内存被分页到磁盘,但我真的觉得你最好让OS管理系统的内存。这是pretty的擅长,我不会第二次猜测为什么操作系统被交换的东西到磁盘,除非我真的知道我在做什么。

You can use VirtualLock to prevent memory from being paged to disk, but I really think you're better off letting the OS manage the system's memory. It's pretty good at it, and I wouldn't second guess why the OS was swapping things to disk unless I really knew what I was doing.

这篇关于我可以告诉Windows不要换出一个特定的过程的记忆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆