X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fdetails%2Fallocator.h;h=78b1d459cbf471a0eb3d7d0a8f9197a5898860d1;hb=ec53bf39af3914a93bd1f53fa8657d5f87583d01;hp=ee7f0302a067adbfa92937b771cdb2709585b55b;hpb=2bb66f1d159d044d2c5dad0f0f968abcb6d53287;p=libcds.git diff --git a/cds/details/allocator.h b/cds/details/allocator.h index ee7f0302..78b1d459 100644 --- a/cds/details/allocator.h +++ b/cds/details/allocator.h @@ -70,20 +70,20 @@ namespace cds { template value_type * New( S const&... src ) { - return Construct( allocator_type::allocate(1), src... ); + return Construct( allocator_type::allocate( 1, nullptr ), src... ); } /// Analogue of operator new T( std::forward(args)... ) (move semantics) template value_type * MoveNew( Args&&... args ) { - return MoveConstruct( allocator_type::allocate(1), std::forward(args)... ); + return MoveConstruct( allocator_type::allocate( 1, nullptr ), std::forward(args)... ); } /// Analogue of operator new T[\p nCount ] value_type * NewArray( size_t nCount ) { - value_type * p = allocator_type::allocate( nCount ); + value_type * p = allocator_type::allocate( nCount, nullptr ); for ( size_t i = 0; i < nCount; ++i ) Construct( p + i ); return p; @@ -96,7 +96,7 @@ namespace cds { template value_type * NewArray( size_t nCount, S const& src ) { - value_type * p = allocator_type::allocate( nCount ); + value_type * p = allocator_type::allocate( nCount, nullptr ); for ( size_t i = 0; i < nCount; ++i ) Construct( p + i, src ); return p;