Could someone shed some light on how to find the code snippets related to the implementation of the "new" operator?

Marc Glisse marc.glisse@inria.fr
Wed Aug 5 07:07:59 GMT 2020


On Wed, 5 Aug 2020, 孙世龙 sunshilong via Libstdc++ wrote:

> Hi, list
>
> I hope to study the implementation of the "new" operator.
> But I could not find it in the related git(i.e.
> https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3).
>
> For LLVM, I can easily get the answer: there is a  file named new.cpp
> (https://github.com/llvm/llvm-project/blob/master/libcxx/src/new.cpp).
>
> For libstdc++, I don't know where I am wrong. There is no such file.
> I have googled it for a long time, but I am still confused.
> I would be grateful to have some help with this matter.

In 
https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3/libsupc%2B%2B
you can find several files with "new" in their name.

-- 
Marc Glisse


More information about the Libstdc++ mailing list