gpt4 book ai didi

CleanMem 工具 - 自动释放 Windows 上分配的内存?

转载 作者:行者123 更新时间:2023-11-30 18:58:57 25 4
gpt4 key购买 nike

http://www.pcwintech.com/about-cleanmem

  • 有人用过这个工具吗?
  • 使用简单的 C 程序执行 malloc,然后在 Windows 上永远休眠,如果运行 cleanmem,我可以看到内存会下降。

问题:

  • 这个工具是否通过将进程内存移动到系统缓存来产生错觉? (与使用 Windows API 一样)
  • 如果使用C时是这种情况,每个人都会更喜欢运行cleanmem,而不是做free(我不同意这一点,“内存泄漏就是内存泄漏”,除非你调用free)
  • Linux 上有类似的工具吗?

最佳答案

这个程序实际上并没有做任何事情。作者知道的知识足够危险,但并不真正了解 Windows 中的内存如何工作。这可能是您链接的页面上我最喜欢的一行:

Warning: Memory Terminology in Windows is completely screwed. System Cache could mean something else, perhaps Memory Cache is better? as proof of this confusing way the memory has been labeled in windows, in Windows XP the PF usage in the task manager is actually commit charge, not page file usage

如果您确实可以阻止 Windows 写入页面文件,那么您所能做的就是使程序耗尽内存并崩溃。

这句话也很搞笑:

CleanMem WILL NOT make your system faster. What CleanMem does, again, is help avoid the use of the page file on the hard drive, which is where your slow down comes from. There have been users including my self who have noticed a smoother system. A placebo effect perhaps? Who knows. I do know that CleanMem hurts nothing, and does help, to a point.

编辑

还有一个:

I think I should also clarify, I am no memory expert.

关于CleanMem 工具 - 自动释放 Windows 上分配的内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14316170/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com