X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tbb%2Finclude%2Ftbb%2Fconcurrent_queue.h;h=cc7ac33599a02539712dca592924003a3c0d9f0b;hb=4c96b4064a92f65beead3cb2453d727187bed40f;hp=5ea6909d2b0d99c26ca6e5deb7d5c975dc83ccb2;hpb=46ab0514ba58ee00183ff0584c7ea7c9e3d76494;p=casparcg diff --git a/tbb/include/tbb/concurrent_queue.h b/tbb/include/tbb/concurrent_queue.h index 5ea6909d2..cc7ac3359 100644 --- a/tbb/include/tbb/concurrent_queue.h +++ b/tbb/include/tbb/concurrent_queue.h @@ -29,7 +29,7 @@ #ifndef __TBB_concurrent_queue_H #define __TBB_concurrent_queue_H -#include "_concurrent_queue_internal.h" +#include "internal/_concurrent_queue_impl.h" namespace tbb { @@ -48,7 +48,7 @@ class concurrent_queue: public internal::concurrent_queue_base_v3 { page_allocator_type my_allocator; //! Allocates a block of size n (bytes) - /*overide*/ virtual void *allocate_block( size_t n ) { + /*override*/ virtual void *allocate_block( size_t n ) { void *b = reinterpret_cast(my_allocator.allocate( n )); if( !b ) internal::throw_exception(internal::eid_bad_alloc); @@ -199,7 +199,7 @@ class concurrent_bounded_queue: public internal::concurrent_queue_base_v3 { *static_cast(dst) = from; } - /*overide*/ virtual page *allocate_page() { + /*override*/ virtual page *allocate_page() { size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); page *p = reinterpret_cast(my_allocator.allocate( n )); if( !p ) @@ -208,7 +208,7 @@ class concurrent_bounded_queue: public internal::concurrent_queue_base_v3 { } /*override*/ virtual void deallocate_page( page *p ) { - size_t n = sizeof(padded_page) + items_per_page*sizeof(T); + size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); my_allocator.deallocate( reinterpret_cast(p), n ); }