1. A resistive random access memory, comprises: a bottom electrode disposed on a substrate; a metal oxide layer with oxygen vacancies disposed on the bottom electrode and directly contacted to the bottom electrode; an oxygen atom gettering layer, oxidized by migrated oxygen atoms of the metal oxide layer, disposed on the metal oxide layer; and a top electrode formed on the oxygen atom gettering layer; wherein the oxygen atom gettering layer comprises a first sub-layer directly contacted the top electrode and a second sub-layer directly contacted the metal oxide layer, wherein the first sub-layer is not oxidized by migrated oxygen atoms and the second sub-layer is oxidized by migrated oxygen atoms.