如何自动关闭 Windows 上使用超过指定内存量的进程

发布于 2024-09-05 07:08:24 字数 146 浏览 1 评论 0原文

如何在 Windows 上自动关闭使用超过指定内存量的进程? 是否可以指定一定数量的内存(例如 1MB)并使用这些参数运行一些可执行文件?如果进程尝试分配超过该数量的内存,它应该关闭并返回一些错误值。有没有一种简单的方法可以在 Windows 上执行类似的操作? 原谅我的英语。

How to automatically close process that uses more that specified amount of memory on Windows?
Is it possible to specify some amount of memory (for example 1MB) and to run some executable file with those parameters? If the process tries to allocate more than that amount of memory it should close and return some error value. Is there an easy way to do something like that on Windows?
Excuse my English.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如此安好 2024-09-12 07:08:24

您可以使用这个SO答案来获取内存性能stats 和 TerminateProcess 来终止它。

You can use this SO answer to get memory performance stats and TerminateProcess to kill it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文