When doing complexity analysis, they never account for the costs of memory allocation/deallocation on the heap. In particular, this is the case for the announced complexities of the operations on containers.
But allocation/deallocation does not come for free and unfortunately is implementation-dependent. Furthermore, one may suspect that the costs are dependent on the whole allocation/deallocation history, via fragmentation. To me, this seems a grey area of the characterization of algorithms, and I believe that in some cases this hidden cost could invalidate low complexity claims such as O(1) or amortized O(1).
So I wonder if there are reasonable models of the complexity of real heap management systems that reflect the behavior of those commonly implemented with compilers. Is there a better answer than "this is implementation dependent" ?
Or another way to ask the question: is it justified to ignore these costs ?
Note that I am aware of the post What is the time complexity of memory allocation assumed to be?, but I expect a more concrete answer.