Segmentation fault
From Gentoo Linux Wiki
- This page is a candidate for deletion
- Reason given: Extremely short stub with not context information.
- If you disagree with its deletion, please explain why on its discussion page.
- If you intend to fix it, please remove this notice, but do not remove this notice from articles that you have created yourself.
- Make sure no other pages link here and check the page's history before deleting.
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
A segmentation fault occurs when an attempt is made to access a memory location that is out of bounds (for example a location that isn't mapped into the virtual address space for the process), or does not permit the access method being used (for example by writing to a readonly location).
[edit] Segmentation Faults in a C Program
Within a C program, a sementation fault usually occurs when an attempt is made to read from beyond the end of an array, or when you an attempt is made to dereference a pointer that's NULL or contains a garbage value (typically because an integer or typecast data has been written into a pointer).
