Re: One question about operator new in libstdc++.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shigang Zan <zanshigang@xxxxxxxxxxx> writes:

> My question is does operator new will always call malloc?
> When I try to write a tool to monitor malloc/free for memory leak, is it enough? If malloc/free have no problem, can we make sure C++ code also have no problem in memory leak issue?

Programs are permitted to define their own version of operator new.
However, if you don't do that, then, yes, when using g++, all calls to
operator new will call malloc.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux