You are a C programmer, aren't you? |
Indeed ;). And also a C++, BREW, Java, and J2ME programmer.
The mapping function is implementation-defined [Note: it is intended to be unsurprising to those who know the addressing structure of the underlying machine. ] |
I would not be surprised if some very small devices (like, smaller than cell phones) do mean things like try to save bytes when allocating pointers in heap vs stack... I've written virtual machines that do the same, and seen enough grievous atrocities against accepted standards in commercial architectures to know that stuff can change on you... fun, fun times.
But since trster didn't mention a small device...
unsurprising to those who know the addressing structure |
If the program will probably use between 32KB and 2GB of ram, and the register size is 4 bytes...
C-style casts as you use are very dangerous in C++ because contrary to what you state, some casts actually do generate code (in particular when inheritance comes into play). |
Correct, a C++ programmer can
overload typecasting operations, and hide code and heavy weight processes behind simple syntax for the sake of code candy... that's one of the reasons I prefer C-style architecture over C++, because you can actually understand exactly what it's doing when you read it...
That
could be what is going on to cause the slow down you mention, overloaded type-casting.