Vikas Madhusudana
Vikas Madhusudana

Reputation: 1482

Does the virtual memory of a process ever shrink?

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

Upvotes: 0

Views: 159

Answers (1)

xvan
xvan

Reputation: 4855

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.

Upvotes: 1

Related Questions