What kind of memory that standard library algorithms can use is not required by the standard, so implementation can usually be done at will. This includes heap memory allocation.
You can check if any particular implementation provides the guarantees you want, but again, in general, you cannot control how the implementation implements its algorithms.
But:
The background is that I am considering introducing some standard library algorithms into an embedded environment in which the use of controlled memory is critical. (especially a bunch should not be used).
An implementation must ensure that its algorithms do what they need to do, as defined by standards. This means: if you have a C ++ compiler that supports your target environment, it should do the right thing on the specified target platform, but it does.
In particular: if your platform does not have a heap, any implementation that supports it should not use a heap.
source share