Bus Error
Related Blog Items
- How Bus Error occurs
- Can we use printf() in an ISR?
- What if I forget the [] when deleteing array allocated via new T[n]?
- L-Value and R-Value Expressions
- Stream buffering
Bus error occurs when hardware tells the OS about a problematic memory reference. 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.
union {
char a[10];
int i;
}u;
A bus error can also be generated by referencing memory that does not physically exist.
Alignment means that data items can only be stored at an address that is multiple of their size.
A program to cause a bus error is:
int *p = (int*) &(u.a[1]);
*p = 17; /* the misaligned addr is p causes a bus error */
Simply, a bus error means that the CPU disliked something about that memory reference, while segv means that the MMU disliked something about it.
Popularity: 9%
You need to log on to convert this article into PDF
Related Blog Items - How Bus Error occurs
- Can we use printf() in an ISR?
- What if I forget the [] when deleteing array allocated via new T[n]?
- L-Value and R-Value Expressions
- Stream buffering
Related Blog Items
- How Bus Error occurs
- Can we use printf() in an ISR?
- What if I forget the [] when deleteing array allocated via new T[n]?
- L-Value and R-Value Expressions
- Stream buffering
Any ideas to identify the exact DIMM slot of the incorrect memory reference,which lead to Bus error
February 15th, 2007 at 12:29 pm
As DIMM slot map to address range, I think we need to identify based on the address…
February 16th, 2007 at 11:30 am
Ponnada..please let me know,if you know any method to figure out the incorrect memory reference to the its DIMM slot level.
February 19th, 2007 at 9:42 pm
pratap,
if you are talking about incorrect memory reference (by a program) to a good DIMM slot, then depending on the address (incorrect reference) we can identify the DIMM slot (which is a memory bank, and will have a address range), if you are talking about identifying a incorrect/bad DIMM slot in all DIMM slots, we can use trail and error method to find out the bad slot (with bad DIMM slot we can not boot even (not sure though)). thanks.
February 20th, 2007 at 12:50 pm