This is the mail archive of the
mailing list for the libstdc++ project.
Re: libstdc++/16612, empty basic_strings can't live in shared memory
Nathan Myers wrote:
On Wed, Aug 04, 2004 at 09:27:37PM +0200, Paolo Carlini wrote:It cannot be so arranged on some systems. For example, some systems
allocate memory to shared objects based on link order, so unless
libsupc++ is always the first library, one can't be sure it will end up
at the same place. Also, if multiple libraries want to be loaded at the
same address, the dynamic linker will have to pick one.
However, as Nathan wrote, "let's not be hasty": it's the first time
in *years* that someone notices this problem, and I still have hopes
there is an even better solution: operator is such a *basic*
operation and would be *so* sad adding a conditional...
Not to mention that length(), capacity(), and (really) everything
else besides would need the same treatment.
I like the idea of using static space in libsupc++. It's simpler,
and should improve performance of the plain vanilla string, too, by
avoiding relocation indirections. Can anybody say whether it could
be arranged for static storage in libsupc++ to appear at the same
address in all programs compiled for a given ABI version?