Distinguished the flags profile_pymem and profile_pgmem