نمايش پست تنها
قديمي ۱۲-۶-۱۳۹۳, ۱۰:۰۱ بعد از ظهر   #2 (لینک دائم)
hassans Male
عضو جدید
 
آواتار hassans
 
تاريخ عضويت: اسفند ۱۳۹۳
پست ها: 1
تشكرها: 0
0 تشكر در 0 پست
پيش فرض

Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” It’s a helper mechanism that keeps you from corrupting the memory and introducing hard-to-debug memory bugs. Whenever you get a segfault you know you are doing something wrong with memory – accessing variable that has already been freed, writing to a read-only portion of the memory, etc. Segmentation fault is essentially the same in most languages that let you mess with the memory management, there is no principial difference between segfaults in C and C++.

There are many ways to get a segfault, at least in the lower-level languages such as C(++). A common way to get a segfault is to dereference a null pointer:
hassans آفلاين است   پاسخ با نقل قول