◄ Wiki / OS
trap vector
A number the CPU records to say which kind of error or interrupt just occurred.
When a CPU hits an exception — a divide-by-zero, a bad memory access, a hardware interrupt — it needs to know which handler to run. The trap vector is the index into a table of handlers that identifies the specific cause. In mzOS2 this identifier is saved into the fault record so the OS can report exactly what went wrong.
See also
- use-after-freeA bug where a program keeps using a piece of memory after it has already been handed back and freed.
- userspaceThe world where ordinary programs run, kept separate from the privileged core of the operating system.
- virtual memoryGiving each program its own private-looking memory space that the hardware maps to real physical memory behind the scenes.