Use MaxSizeVector instead of std::vector: xcode sometimes assumes that std::vector allocates aligned memory and therefore issues aligned instruction to initialize it. This can result in random crashes when compiling with AVX instructions enabled.

This commit is contained in:
Benoit Steiner
2016-09-02 19:25:47 -07:00
parent 373c340b71
commit 13df3441ae
2 changed files with 3 additions and 3 deletions

View File

@@ -123,7 +123,7 @@ class NonBlockingThreadPoolTempl : public Eigen::ThreadPoolInterface {
MaxSizeVector<Thread*> threads_;
MaxSizeVector<Queue*> queues_;
MaxSizeVector<unsigned> coprimes_;
std::vector<EventCount::Waiter> waiters_;
MaxSizeVector<EventCount::Waiter> waiters_;
std::atomic<unsigned> blocked_;
std::atomic<bool> spinning_;
std::atomic<bool> done_;