Skip to content

Commit 59d8aa6

Browse files
committed
Avoid using deprecated functions internally
1 parent b401b56 commit 59d8aa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/boost/interprocess/allocators/allocator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class allocator
284284
//!will be assigned to received_size. Memory allocated with this function
285285
//!must be deallocated only with deallocate_one().
286286
void allocate_individual(size_type num_elements, multiallocation_chain &chain)
287-
{ this->allocate_many(1, num_elements, chain); }
287+
{ mp_mngr->allocate_many(sizeof(T), num_elements, boost::container::dtl::alignment_of<T>::value, chain); }
288288

289289
//!Deallocates memory previously allocated with allocate_one().
290290
//!You should never use deallocate_one to deallocate memory allocated
@@ -299,7 +299,7 @@ class allocator
299299
//!will be assigned to received_size. Memory allocated with this function
300300
//!must be deallocated only with deallocate_one().
301301
void deallocate_individual(multiallocation_chain &chain)
302-
{ this->deallocate_many(chain); }
302+
{ mp_mngr->deallocate_many(chain); }
303303

304304
//!Returns address of mutable object.
305305
//!Never throws

0 commit comments

Comments
 (0)