I develop on windows 64bit with VS2015.
I used a custom logger but it suffered from heap fragmentations.
I found log4cpp library. According to the source code it uses std::ostringstream internally.
My questions:
- I think my main question is can I use
log4cppsafely and not worry about heap fragmentations? - The first question probably leads to the questions how does
std::ostringstreamwork internally to prevent heap fragmentations? Does it have multiple buffers in stack for small strings or does it always allocates a new string in heap?