Is there a programmatic way to actually figure out the total memory footprint of a group of forked processes. If you add up all the memory sizes of 40 instances of a script I have you get 6.5GB, but examining total memory usage via top I only see usage increasing somewhere along the lines of 100MB.
I realize that some memory is shared between forked processes but is there any good way to measure that?