AnsweredAssumed Answered

NEW Operator under µVision 4

Question asked by fischer_gundlach.jus on Apr 15, 2013
Latest reply on Apr 18, 2013 by rocketdawg
Hello Community,

i´m having a stm32f3Discovery under the Keil´s µVision4 Compiler programming in c++.
I got to the point, where i could use the "NEW"  operator.
To be honest, i have no idea, what is really going on. I know in principle this operator
allocates space for the given type and returns a pointer in case of success.
As long i used this on a desktop PC i didn´t care, since there ia an OS under my feet.
I mean, if i allocate space i guess this trigger the OS to "talk" to some kind of
memory controller if there is enough space and where it is, and also handles
the cirumstances if the memory becomes fragmented. (?)

And this is where my understanding ends when it comes to bare µC´s. Do i really have to
import a complete OS just for getting new/delete oportunities?
And what is administrating the RAM in my STM32F3 i could "talk" to? Would i have do
make this RAM controller by my own?
For summing up the whole scenery in one question:
What is going on in my stm32F3 if the compiler finds a "NEW"?

yours sincerly,
Justus

Outcomes