Why is a segmentation fault called a segmentation fault?
-
I understand that a segfault is an access violation to memory that the CPU cannot physically address, but why is it called a "segmentation" fault.
-
Answer:
Segmentation is a virtual memory management technique similar to paging. Memory is divided into "segments" (which, unlike pages, can be different sizes). Programs may be restricted to reading or writing memory within their own segments. A miscalculated address might lead your program to read or write outside its allocated segment, triggering an interrupt. (That's probably somewhat oversimplified, but it gets at the main point.)
Matthew Saltzman at Quora Visit the source
Other answers
That is old terminology from the days when memory management was done through many variable length segments instead of the current fad of having just a few areas for code and stack and data. In the old days a good compiler and run-time could put each array and object each in a hardware-protected segment so that buffer overflows were impossible. Those were the days.
George Gonzalez
Related Q & A:
- How to artificially cause a page fault in linux kernel?Best solution by Stack Overflow
- Where can I find a brand name called G&H CALIFORNIA with a moose logo in Singapore?Best solution by answers.yahoo.com
- Why is it called a HONEYMOON?Best solution by Yahoo! Answers
- How is it decided whether a road will be called a road, street, avenue or drive?Best solution by Yahoo! Answers
- Why is Independence Day usually called the Fourth of July?Best solution by history.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.