Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Linux by (6.1k points)

What I know is that it crashes programs due to some sort of memory leak problem. How to deal with this issue and is this system’s problem or the problem of application?

1 Answer

0 votes
by (11.7k points)

A segmentation fault in Linux occurs at the moment your program attempts to access memory which is either not assigned by the operating system, or access is denied.

When each process on your computer has its own virtual address space, referred to as segmentation. So, when Process A reads memory location 0x877, it reads information residing at a different physical location in RAM than when Process B reads its own 0x877.

Latest operating systems support and use segmentation, and so all can produce a segmentation fault.

If you fix the code, you can get rid of the segmentation fault. It mostly occurs due to bad programming such as boundary-condition errors, incorrect pointer manipulation, or invalid assumptions about shared libraries.

Sometimes in many cases segmentation fault also occurs due to faulty hardware. 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 18, 2021 in Linux by rahulnayar01123 (6.1k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 23, 2020 in Python by sabarish (200 points)

Browse Categories

...