process_mem_usage gathers all the used memory for a given command line