The forming process in resistive-memory elements based on metal-insulator-semiconductor structures