Re: STL vector

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

 



On Thursday 03 November 2005 16:49, random@xxxxxxxxxxxxxxx wrote:
> Mws wrote:
> 
> >On Tuesday 01 November 2005 11:01, Dima Sorkin wrote:
> >  
> >
> >>>i'll think i'll implement my own templates for the std::<classes> with
> >>>extended safety.
> >>>      
> >>>
> >> Before you do it, try debug mode of STLport (www.stlport.org).
> >>It is almost paranoidal mode, it checks things you could not even
> >>fantasize about.
> >>
> >>Regards,
> >> Dima.
> >>
> >>    
> >>
> >yes, i downloaded it and had a look at the source:
> >
> >  void pop_back() {
> >    --this->_M_finish;
> >    _Destroy(this->_M_finish);
> >  }
> >
> >the same unchecked stuff :)
> >
> >  
> >
> Just to point it out, if you check the debugging version (it lives in
> debug/vector), the function looks like:
> 
> void
> pop_back()
>       {
>         __glibcxx_check_nonempty();
>         iterator __victim = end() - 1;
>         __victim._M_invalidate();
>         _Base::pop_back();
>       }
> 
> Some nice checking there :)
yes, sounds to be a solution. i will try out and see if a glibc/libcstd++ combination including
the debug stuff is able to run on an embedded system with limited resources. e.g. 32 mb ram.

regards marcel


[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