wijhierbeneden wrote:
Hello
Where can I find some info about the inner working of new/delete??
Is this compiler specific or defined by the standard??
The general behavior is defined by the standard in 3.7.3 that talks
about the allocation functions (operator new/delete) themselves,
5.3.4 and 5.3.5 which talk about the new/delete expressions themselves,
and of course 8.5 and 12.1 which talk about how initialization/consturctor
invocation occurs.
There is a lot
of info about the different malloc implementations but I can't find
anything about new.
The standard doesn't discuss the actual implentation of the allocation
deallocation function internals (just their interfaces) other than to
point out that they are designed to be able to be impelemented on top of
malloc/delete without much toil. In actuality, most implementations
do exactly that. Since they need to coexist with malloc, you have to
pretty much implement one in terms of the other or have them both call
a third common allocator.