@@ -913,7 +913,7 @@ void *DisjointPool::malloc(size_t size) { // For full-slab allocations indicates
913
913
auto Ptr = impl->allocate (size, FromPool);
914
914
915
915
if (impl->getParams ().PoolTrace > 2 ) {
916
- auto MT = impl->getParams ().name ;
916
+ const auto & MT = impl->getParams ().name ;
917
917
std::cout << " Allocated " << std::setw (8 ) << size << " " << MT
918
918
<< " bytes from " << (FromPool ? " Pool" : " Provider" ) << " ->"
919
919
<< Ptr << std::endl;
@@ -938,7 +938,7 @@ void *DisjointPool::aligned_malloc(size_t size, size_t alignment) {
938
938
auto Ptr = impl->allocate (size, alignment, FromPool);
939
939
940
940
if (impl->getParams ().PoolTrace > 2 ) {
941
- auto MT = impl->getParams ().name ;
941
+ const auto & MT = impl->getParams ().name ;
942
942
std::cout << " Allocated " << std::setw (8 ) << size << " " << MT
943
943
<< " bytes aligned at " << alignment << " from "
944
944
<< (FromPool ? " Pool" : " Provider" ) << " ->" << Ptr
@@ -957,7 +957,7 @@ enum umf_result_t DisjointPool::free(void *ptr) try {
957
957
impl->deallocate (ptr, ToPool);
958
958
959
959
if (impl->getParams ().PoolTrace > 2 ) {
960
- auto MT = impl->getParams ().name ;
960
+ const auto & MT = impl->getParams ().name ;
961
961
std::cout << " Freed " << MT << " " << ptr << " to "
962
962
<< (ToPool ? " Pool" : " Provider" )
963
963
<< " , Current total pool size "
0 commit comments