My question is similar to this, however I'm asking something a bit different.
It is clear, that it is possible to use the address of the first std::vector
element as a C
type array. That means that in virtual memory, std::vector
elements are contiguous. However, if physical memory is fragmented, it is possible that std::vector
is actually split into many parts in the physical memory.
My question is: Are std::vector
elements contiguous in physical memory (as well as virtual memory)?