K
Kobu
Hi,
The addresses seens in C's "layer" aren't necessarily the same as the
actual physical addresses in computer core (in fact, this is almost
always true for big OSes because of memory management).
So does this also mean that a certain number of contiguous bytes of
memory in C's layer (say, an array of chars or ints) is not necessarily
adjacent/contiguous bytes in core (but it probably is in big OSes)?
If the above is correct (not necessarily the same), then is memmove
guaranteed to make up for the differences? Say I have a char[40] array
in a program in any hosted C compiler in the world, and I memove the 40
bytes in the array to some other buffer in my program. Is it
guaranteed to be contiguous (at C's level) and in the same order?
Thanks..
The addresses seens in C's "layer" aren't necessarily the same as the
actual physical addresses in computer core (in fact, this is almost
always true for big OSes because of memory management).
So does this also mean that a certain number of contiguous bytes of
memory in C's layer (say, an array of chars or ints) is not necessarily
adjacent/contiguous bytes in core (but it probably is in big OSes)?
If the above is correct (not necessarily the same), then is memmove
guaranteed to make up for the differences? Say I have a char[40] array
in a program in any hosted C compiler in the world, and I memove the 40
bytes in the array to some other buffer in my program. Is it
guaranteed to be contiguous (at C's level) and in the same order?
Thanks..