I combined the front end of 'free' from Linux's procps with the back end of Mac OS X's vm_stat. the result is a cool memory status reporter for OS X. see the man page for 'free' for details.
No reporting for swap usage or shared memory pages. That would require iterating over all threads on the system.
A binary is included in the tarball. If you need to build your own, there is also a Makefile included.
I have a browsable and downloadble Git repository
Here's a sample of the output.
that sample indicates that my ibook had 289520 kilobytes of memory used by all running programs. 'top' would have indicated there was 525576 kilobytes used; while true, top isn't very informative, since that is actually the total of all the memory used for caching as well as memory used by running programs.
a lengthy description of virtual memory concepts in OS X
Summary of the terms "wired", "active", "inactive", "used", "free", excerpted from the link above: