STL's operator new function

In the STL source code analysis mentioned in this operator new function, then there said new following calls operator new, bloggers feel that these words have a problem, for two reasons:
1, the operator is an operator keywords, such as we should overload an operator, our writing is certainly operator xxx (xxx, xxx ....) , it is mentioned in the book calls the operator new, I do not agree, I think the new equivalent to the new operator
2, in C / C ++ inside, usually related to the function call hierarchy, who calls whom, when debugging is also a jump, but bloggers when debugging, and did not see where the new function, but is to jump directly to the operator new. Here are debugging information bloggers.

Bloggers less likely to cut video, use a series of pictures to illustrate it!
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function

Let's look at an array of
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function
STL's operator new function

Here go the operator new [] inner layer called operator new, but there did not see the new function [] where, but jump directly to here, we can see new [] is equivalent to operator new [], then presumably new It is equivalent to the operator new

Another point, in my other blog (CSDN) have been Tucao, operators can use to adjust the function name can also be used later to adjust typedef name.
STL's operator new function
So the book says new tune operator new, too hasty, there is not enough evidence.

Of course, the book said operator new tune malloc, this being wrong, please do not doubt.

Above the main Bo own humble opinion, inadequacies also please correct me.

Guess you like

Origin blog.51cto.com/11753138/2446721