Re: bus error



sophia.agnes@xxxxxxxxx wrote:

Dear all,

I was going through peter van der linden's book expert C programming
there i found the following section on bus error

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 by error detection and correction circuitry, that
parity errors are almost un heard of at the application programming
level.

how true is the above explanation and that can any one give example
code for generating memory parity error ?

For general computer questions like this try <news:alt.comp.hardware> or
<news:comp.sys.ibm.pc.hardware.*>. This has nothing much to do with
Standard C.

a bus error can also be generated by referencing a memory that do not
physically exists

Under certain system's yes. Such details are always architecture
specific, so you cannot generalise.

i tried this example:-

int *p = (int*)(-3);
*p =17;

but i am getting only segmentation fault.

what could be proper example for the above statements

<OT>
I suppose a misalinged attempt at access might generate a bus error.
</OT>

.



Relevant Pages

  • bus error
    ... I was going through peter van der linden's book expert C programming ... a few years ago bus errors were also generated if a memory parity ... a bus error can also be generated by referencing a memory that do not ...
    (comp.lang.c)
  • Re: bus error
    ... I was going through peter van der linden's book expert C programming ... a few years ago bus errors were also generated if a memory parity ... a bus error can also be generated by referencing a memory that do not ...
    (comp.lang.c)