In Linux, the easiest way to look at a process\' memory map is looking at /proc/PID/maps, giving something like this:
/proc/PID/maps
08048000-08056000 r-xp 00000000
GNUlib (http://www.gnu.org/software/gnulib/) contains a function for iterating over all the virtual memory segments in most OSes including MAC OS X. It's in vma-iter.c