??? 03/01/09 06:38 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#162961 - Compiler Cannot Save the Day At Runtime Responding to: ???'s previous message |
In a program written in the C language there are about a thousand ways to shoot a hole in your array. You could have any number of errors in your code including some of these examples:
- Referencing arrays with [index]'s that are beyond the end of the array - Using pointers where the value of the pointer is not "->"ing properly to the right place - Using library code that has certain restrictions or usage rules that you are not following - Programming hardware DMA address pointers into areas that are occupied by data of other variables - Not comprehending some behavior of a hardware peripheral that may be designed to use RAM buffers at fixed locations. Remember at all times that programs written in C have no run time error checking on array index ranges and that it is up to the programmer to validate that all array references and pointer usages are aimed at the correct memory locations. If the wrong data is being unexpectedly being modified take that as a clue that there is a bug in your program or maybe a misunderstanding how the hardware works. Michael Karas |