If you need to debug memory usage and segments on a BSD based unix machine, vmmap is the ticket.

vmmap [process id]