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]

Re: reference counting in string's allocator, where else?


Ok, perhaps I am mistaken by posting here then.  The g++ string that I am refering to live is:/usr/local/include/g++-3/std;  it contains the following block of code:

%gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)

template <class charT, class traits, class Allocator>
inline basic_string <charT, traits, Allocator>::Rep *
basic_string <charT, traits, Allocator>::Rep::
create (size_t extra)
{
  extra = frob_size (extra + 1);
  Rep *p = new (extra) Rep;
  p->res = extra;
  p->ref = 1;
  p->selfish = false;
  return p;
}

Does this block of code exist still?

On Tue, 28 Aug 2001 bkoz@redhat.com wrote:

> > We have been running into problems (core dumps) with the allocators in string not being thread safe when using the 2.95.2 and 2.95.3 gcc builds.
>
> Keep in mind that gcc-2.9.x and gcc-3.x come with completely different
> sources for libstdc++. This list is for libstdc++-v3, or the gcc-3.x version.
>
> -benjamin
>

--
Andrew Lundgren
Andrew.Lundgren@level3.com


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