Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Intel Thread Building Blocks allocators.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 ill   Members   -  Reputation: 320

Like
0Likes
Like

Posted 01 February 2012 - 02:57 AM

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?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS