This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: multimap.clear() does not free its memory


Hi Toon -

Yeah, since I posted, I also noticed somewhere or another that the
default now is to use new.  I guess it's been a little while since I
looked at the internals... sorry about the missinformation there. 
However the stuff about the pools is still valid, and might be a way
to solve your problem.

  Brian

On Apr 11, 2005 1:58 PM, Toon Knapen <toon.knapen@fft.be> wrote:
> Brian Budge wrote:
> > If you do a google search for using allocators with STL, there's a
> > multitude of info.  You can tell STL to use the "new allocator" or the
> > "malloc allocator"...
> 
> Looking at 20.4.1.1 par 2 there's a note that says that the allocate
> member of the allocator uses new. Maybe this is not a strict requirement
> that _all_ allocators have to use new but at least I would expect the
> default allocator to use new. Otherwise the behaviour would not be
> standard conforming IIUC.
> 
> 
> > though I'm not sure if these are standard or
> > not.  If they're not standard, I believe that stlport has them.
> > Sorry, it's been a while.
> 
> The (outdated) SGI STL documentation talks about 'malloc_alloc' and
> 'single_client_alloc' but the standard apparantly does not mention any
> other than the default allocator (AFAICT ;-(
> 
> thanks already for your helpfull response,
> toon
>


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