Increase size of std::function small object buffer

Oleg Endo oleg.endo@t-online.de
Sat Jul 30 23:39:00 GMT 2016


On Sat, 2016-07-30 at 22:07 +0100, Jonathan Wakely wrote:

> 
> > I see a simple solution to this:
> > 
> > Increase the internal buffer of std::function to 24 bytes from 16
> > bytes
> > as the method pointer uses 16 bytes while the pointer to class
> > instance
> > uses another 8 bytes.
> 
> That would break the library ABI, so is not an option.
> 

He was saying that he's on an embedded system.  Very often ABI
stability is not of a concern in such cases.  Of course on
desktop/server systems ABI stability is a concern.  But imposing it on
every system?

Maybe we could have some configure options to control these kind of
parameters when building the toolchain?

Cheers,
Oleg



More information about the Libstdc++ mailing list