Writing on Dirty Memory