htop : swapping when still having freememory

2

I am using htop and I don't understand this output (MAC OS 10.13): enter image description here

I understand there is 748 M of swap, while 4.7g of memory is free.. Why is there swap when there is free memory ? Do I miss something ?

Romain Jouin

Posted 2018-01-11T14:23:59.677

Reputation: 229

Answers

0

Pages of memory are committed to swap well before you run out of memory. This is useful because applications will tend to allocate many more pages than they use and so many of the swapped pages are never used.

jdwolf

Posted 2018-01-11T14:23:59.677

Reputation: 1 974

0

Has your computer gone into standby since the last start? If so, the contents of your memory have been committed to SWAP to allow for quick wake of previously running processes.

Nothingismagick

Posted 2018-01-11T14:23:59.677

Reputation: 119