Uses different pass count for different parallel queue test cases
[libcds.git] / cds / os / alloc_aligned.h
index 65625d839619017e73b67ec4b34aa7abaa620283..0be7b7226384bbabf01a22b4ffb93afb66c262b3 100644 (file)
@@ -1,7 +1,7 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
@@ -54,6 +54,7 @@
 #include <memory>
 #include <cds/details/is_aligned.h>
 #include <cds/algo/int_algo.h>
+#include <cds/details/throw_exception.h>
 
 namespace cds {
     /// OS specific wrappers
@@ -133,16 +134,16 @@ namespace cds {
             }
 
             // construct default allocator (do nothing)
-            aligned_allocator() throw()
+            aligned_allocator() CDS_NOEXCEPT
             {}
 
             /// construct by copying (do nothing)
-            aligned_allocator(const aligned_allocator<T>&) throw()
+            aligned_allocator(const aligned_allocator<T>&) CDS_NOEXCEPT
             {}
 
             /// construct from a related allocator (do nothing)
             template <class OTHER>
-            aligned_allocator(const aligned_allocator<OTHER>&) throw()
+            aligned_allocator(const aligned_allocator<OTHER>&) CDS_NOEXCEPT
             {}
 
             /// assign from a related allocator (do nothing)
@@ -177,7 +178,7 @@ namespace cds {
                 assert( cds::beans::is_power2( nAlign ));
                 pointer p = reinterpret_cast<T *>( cds::OS::aligned_malloc( sizeof(T) * nCount, nAlign ));
                 if ( !p )
-                    throw std::bad_alloc();
+                    CDS_THROW_EXCEPTION( std::bad_alloc());
                 assert( cds::details::is_aligned( p, nAlign ));
                 return p;
             }
@@ -209,7 +210,7 @@ namespace cds {
             }
 
             /// estimate maximum array size
-            size_type max_size() const throw()
+            size_type max_size() const CDS_NOEXCEPT
             {
                 prototype a;
                 return a.max_size();