Over a million developers have joined DZone.
Silver Partner

Reclaim some memory on Mac OS

 his is a recurring issue for me, having not enough memory on my Mac, so here are some useful commands:

Display how much the memory is used by processes, reclaim some and verify again:

ps -axm -o "rss,comm" | awk 'BEGIN { s=0;}; {s=s+$1;}; END { printf("%.2f GB\n", (s/1024.0/1024));}'
purge
ps -axm -o "rss,comm" | awk 'BEGIN { s=0;}; {s=s+$1;}; END { printf("%.2f GB\n", (s/1024.0/1024));}'
Topics:

Published at DZone with permission of Aurelien Broszniowski , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}