So I started working with Intel Thread Building Blocks and used a concurrent_queue.
By default it uses the cache_aligned_allocator. I was trying to put C++ std::string objects inside and things weren't working.
std::string is just typedef for basic_string<char, char_traits<char>, allocator<char> >
So I thought let's see what happens when I make my strings use cache_aligned_allocator instead of std::allocator.
Suddenly everything worked.
Is there a reason why my strings were corrupted unless I used cache_aligned_allocator?
Intel Thread Building Blocks allocators.
No replies to this topic