Ernie Mur
Ernie Mur

Reputation: 571

Memory allocation of a very large block always possible?

If I make a std::vector which nearly as large as the heap size of the process is, what happens if there is a small chunk of memory allocted just in the middle of the heap?

Will the "alloc" call be successful and the memory management of the computer will take care of moving around the memory pages in order it is possible to use continuous memory?

In my particular case I have an ARM Cortex A4 without Operating system and with gcc or iar as the compiler. But I am also interested on a more general consideration independent of my hardware. I guess that each system having a memory management unit should handle this, isn't it?

Upvotes: 0

Views: 173

Answers (0)

Related Questions