Physical models of size-dependent nanofilament formation and rupture in NiO resistive switching memories | Synapse