Update check_mem.pl