Space charge effects in MNOS memory devices and endurance measurements