try using the ideas for "a memory profiler for unix" or something like that. the paper is in the 1988 summer usenix conference proceedings. danny chen att!homxc!dwc