A segfault, also called a segmentation fault or access violation, is a computer error that occurs when software attempts to access memory incorrectly. The error is raised by the MMU, a hardware component (usually on the CPU) that manages all memory access instructions in the computer.

A segfault may occur, for instance, if improperly written software attempts to write data to a read-only portion of memory, or if it attempts to dereference a null pointer.

The name “segmentation fault” originated in the 1950s. It refers to the fact that only the data segment of a program’s allocated memory is writable, while the code segment is not.

Error, Memory, Programming terms, Segmentation

  • Why do computers get problems?
  • How to create a computer program.