Gravar-mail: Parasitic engineering for RRAM control