Does the virtual memory of a process ever shrink?

不打扰是莪最后的温柔 提交于 2021-01-29 17:17:40

问题


Does the virtual memory of a process ever shrink?. Does the swap size of the process reduce?


回答1:


Virtual memory, today with tons of dirty cheap RAM, is used more for memory protection than for swapping on PC.

So there is no 1:1 correlation between used swap and virtual memory.

And with 64bits addresses there is no need for the OS to claim back unused virtual memory pages. It'll do it if it needs to.

If by swap size, you mean the swap column in top, that's not used swap, but the required swap space to swap in/out the process.



来源:https://stackoverflow.com/questions/36396831/does-the-virtual-memory-of-a-process-ever-shrink

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