Kingsly John <[EMAIL PROTECTED]> writes:

> Can someone explain what bus error is ? I have seen this happen on
> my machine when I try to pipe large amounts of data or
> something... but then on a second try it normally works fine!
> 
> Kingsly

Here is an excerpt from Peter Van Der Linden's excellent "Expert C
Programming" book:

/----
| ...Most of the the problem lies in the fact that the errors represent
| an anomaly the operating system has detected, and the anomaly is
| reported in terms most convenient to the operating system.  The
| precise causes of a bus error and a segmentation fault will thus vary
| among different versions of operating systems...
| 
| In practice, a bus error is almost always caused by a misaligned read
| or write.  It's called a bus error, because the address bus is the
| component that chokes if a misaligned load or store is requested.
| Alignment means that data items can only be stored at an address that
| is a multiple of their size.  On modern architectures, especially RISC
| architectures, data alignment is required because extra logic
| associated with arbitrary alignment makes the whole memory system much
| larger and slower...
| 
| ...A few years ago bus errors were also generated if a memory parity
| error was detected.  These days memory chips are so reliable, and so
| well protected y error detection and correction circuitry, that parity
| erors are almost unheard of at the application programming level.  A
| bus error can also be generated by referencing memory that does not
| physically exist; you probably won't be able to screw up this badly
| without help from a naughty device driver.
\----

The book was published in 1994 by SunSoft Press.

-karra

-- 
All's well that ends.

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to