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: [v3] default linux allocator


Carlo Wood wrote:

On Wed, Jul 14, 2004 at 10:34:28AM -0700, Mark Mitchell wrote:


What if you recompile half of the .o files in your program and not the other half? Do you known have containers in one half using one allocator and containers in the other using the other half? And if so, does that work?



Fyi, a similar change was already done going from 3.4.0 to 3.4.1. In 3.4.0 we have:

 template<bool __threads, int __inst>
     class __pool_alloc

in 3.4.1 that is:

 template<typename _Tp>
     class __pool_alloc : private __pool_alloc_base

Note the different number of template parameters.
As a result - people who upgrade their compiler from 3.4.0
to 3.4.1 have to recompile libcwd.


That's exactly the kind of thing I'm worried about.

If in file1.h, I do:

std::vector<int> v;

and file1.cc, compiled with 3.4.1 does:

v.push(3)

and file 2.cc, compiled with 3.4.2 does:

v.push(4)

what allocator is being used by these files? How do we know it will be compatible, even if the allocator code has been inlined into the .o files?

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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