We have developed a theoretical framework MemriSim for simulating the resistive switching behaviors of oxide memristors. MemriSim comprises two major parts, i) structural evolution of oxygen vacancies during conductive filament formation/rupture by kinetic Monte Carlo (kMC) algorithm, and ii) transport calculations based on the scenario of electron tunneling and thermionic emission with the kMC derived structures. As prototype probes, we have computed the current-voltage (I-V) curves of HfO2 and TaOx based memristors and compared the results with experimental measurements, which show perfect agreement. By tuning the physical parameters, MemriSim can describe resistive switching devices with different oxide layers and metal electrodes. In addition, the pulse transient current can also be simulated by considering the transient response of RLC circuit. The developed framework not only provides a general approach for understanding the fundamental mechanism of resistive switching in oxides, but also opens up new opportunities for designing and optimizing memristor-based architectures for nonvolatile memory, logic-in-memory and neuromorphic computing.Program summaryProgram Title: MemriSim.CPC Library link to program files: https://doi.org/10.17632/8gbbgf8z49.1Licensing provisions: GPLv2.Programming language: C++.Supplementary material: Supplementary material is available.Nature of problem: A general framework for simulating the resistive switching properties of oxide-based memristors; generate the structure of oxide layer during filament formation/rupture; calculate the I-V curves of memristive device; simulate the pulse transient current; predict the resistive switching performance of new devices.Solution method: The framework uses kMC algorithm for structural evolution, the electric field inside oxide layer is computed by the Poisson's equation, and the transport calculation is based on electron tunneling and thermionic emission.