Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Intel Thread Building Blocks allocators.

4: Adsense

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   

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?




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.