The linux tool free(1) just reports how much memory is free (and how much is in use). Simple, really. There’s no obvious equivalent for Darwin, though. We’ve got top(1) which is overkill, and vm_stat(1) which is abstract to say the least. I wrote a variant of free(1) for Darwin a while back, but never reported on the virtual memory (swap) usage. Now I’ve found out enough about the Mach virtual memory manager to include that, there’s an updated Darwin free available. Excuse the manpage, I haven’t updated it to track the new version yet.
I also found out enough about the Mach virtual memory manager to realise that there are a few things I want to change about the dynamic pager. Without a degree in operating systems design, this might take a while…
nice. I’d noticed your post on darwin-dev about this.
Thinking about a darwinport of it?
Nigel: I hadn’t been thinking of such, but now that you mention it…maybe I will :-)
Seeing as you’ve become such a vm expert… :)
I’d like to see someone do a really authoritative article on how to read vm_stat…
Give me time….
BTW, I left a comment on your ‘sleepimage’ post, but I’m not sure that it actually stuck. Is it in some mod queue somewhere, or does your blog software not like Omniweb?
Not sure. it’s not showing up in the mod queue… and I’ve disabled modding comments since I got the SCode plugin working with blojsom.
31 pageSize=4096; -> getpagesize();
what’s darwin-dev ? i mean, just email me back with the link, is it macosxforge.org or darwinports.org or something? firstname.lastname@example.org