3 ms·
> the system may then decide This makes me think if the whole question is really about C++ or the OS implementation for memory allocations. This could have lit
by scoutt 7y ago
> the system may then decide
This makes me think if the whole question is really about C++ or the OS implementation for memory allocations. This could have little to do with C++.
On a bare-metal system, malloc/sbrk (and thus new) can be something as simple as:
uint32_t retptr = heap;
heap += size;
return retptr;