Segmentation Fault - Segmentation, Page Fault, and Access Violation

Segmentation, Page Fault, and Access Violation

A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).

Segmentation is a historic term for the approach to memory management nowadays known as paging (see e.g. Lions' Commentary on UNIX 6th Edition, with Source Code), but the term is still used in the context of "segmentation fault".

On Unix-like operating systems, a signal called SIGSEGV is sent to a process that accesses an invalid memory address. On Microsoft Windows, a process that accesses invalid memory receives the STATUS_ACCESS_VIOLATION exception.

Read more about this topic:  Segmentation Fault

Famous quotes containing the words page, access and/or violation:

    “If Steam has done nothing else, it has at least added a whole new Species to English Literature ... the booklets—the little thrilling romances, where the Murder comes at page fifteen, and the Wedding at page forty—surely they are due to Steam?”
    “And when we travel by electricity—if I may venture to develop your theory—we shall have leaflets instead of booklets, and the Murder and the Wedding will come on the same page.”
    Lewis Carroll [Charles Lutwidge Dodgson] (1832–1898)

    Make thick my blood,
    Stop up th’ access and passage to remorse,
    That no compunctious visitings of nature
    Shake my fell purpose.
    William Shakespeare (1564–1616)

    Injustice, cruelty, restraint of conscience, oppression, falsity, dishonour, deceit, violation of law and equity?—But look how they have cleaned up the cities and what wonderful roads they have built!
    Johan Huizinga (1872–1945)