Fork of ps_mem.py for BSD purposes