What are the side effects of using EmptyWorkingSet?

本秂侑毒 提交于 2019-11-30 14:13:05

I suspect the side-effect will be performance of those other programs - the system will bring the pages swapped out by the call to EmptyWorkingSet() back in when the process needs them.

Messing with the system at such a low level is fraught with danger: in particular, Explorer page faults may slow the system down to the point where strange deadlocks start to rear their ugly heads. Best to leave this to Windows, in particular for other programs that you didn't write.

You may find it more efficient to understand why your own program needs so much memory. Is there a leak somewhere, perhaps?

Personally, I've not deal with this. Seems kind of 'dangerous' :P

Anyway, some articles you might find helpful:
Performance Issues with EmptyWorkingSet
Memory management - forcing a process to free it's memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!