27 Jul
2007
27 Jul
'07
8:40 p.m.
Bill Lear wrote:
I have been searching the world in vain for a stringstream that works with a static buffer, and does not use the heap for memory allocation. We have an application that uses lots (12-16Gb) of memory. This puts a strain on the memory allocation routines, and when we want to create
Which platform?
a small string we find that stringstream is very, very expensive, and sprintf into a static buffer much, much faster.
Does boost provide anything like this?
Have you looked at the boost::iostream library which abstracts out sources/sinks that you can use with buffers that you control? Also have you looked at the boost::format library as a typesafe replacement for sprintf? Jeff Flinn