设置 Windows 进程(或用户)内存限制 [英] Set Windows process (or user) memory limit

查看:36
本文介绍了设置 Windows 进程(或用户)内存限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以设置一个进程可以在 Windows XP 中使用的系统范围内存限制?我有几个不稳定的应用程序,它们在大部分时间都可以正常工作,但可能会遇到一个错误,导致在几秒钟内吃掉整个内存(或者至少我想是这样).这会导致硬重置,因为 Windows 变得完全没有响应并且我丢失了我的工作.

Is there any way to set a system wide memory limit a process can use in Windows XP? I have a couple of unstable apps which do work ok for most of the time but can hit a bug which results in eating whole memory in a matter of seconds (or at least I suppose that's it). This results in a hard reset as Windows becomes totally unresponsive and I lose my work.

我希望能够在 Linux 上执行类似于/etc/limits 的操作 - 例如设置 M90(为单个用户设置 90% 的最大内存分配).所以系统无论如何都会得到剩下的 10%.

I would like to be able to do something like the /etc/limits on Linux - setting M90, for instance (to set 90% max memory for a single user to allocate). So the system gets the remaining 10% no matter what.

推荐答案

使用 Windows 作业对象.作业就像进程组,可以限制内存使用和进程优先级.

Use Windows Job Objects. Jobs are like process groups and can limit memory usage and process priority.

这篇关于设置 Windows 进程(或用户)内存限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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