This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::map allocations questions


On 7 December 2010 23:07,  <dagecko@free.fr> wrote:
>
> Hi,
>
> sorry to bother you here,
>
> I wanted to create a memory checker for my programs. I tried to used
> std::map for this.
> So I do something like this (I don't like to send code like this, the
> first time, but I hope this would help...)

The gcc-help mailing list is more appropriate for this question.  This
list is for development of libstdc++, not help about using it.

>
> With the appropriate overloading of new function.

I can only guess what you consider "appropriate" but obviously
std::map allocates memory internally, so if you have replaced the
global new operator, then it will get called recursively.

This is not a problem with std::map, it's just unavoidable that a
container using dynamically-allocated memory will have to allocate
memory!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]