@@ -793,7 +793,7 @@ GraphicsAllocation *DrmMemoryManager::allocatePhysicalDeviceMemory(const Allocat
793793 auto isCoherent = productHelper.isCoherentAllocation (patIndex);
794794 uint32_t handle = ioctlHelper->createGem (bufferSize, static_cast <uint32_t >(allocationData.storageInfo .memoryBanks .to_ulong ()), isCoherent);
795795
796- std::unique_ptr <BufferObject, BufferObject::Deleter> bo ( new BufferObject ( allocationData.rootDeviceIndex , &drm, patIndex, handle, bufferSize, maxOsContextCount) );
796+ auto bo = std::make_unique <BufferObject>( allocationData.rootDeviceIndex , &drm, patIndex, handle, bufferSize, maxOsContextCount);
797797
798798 auto allocation = new DrmAllocation (allocationData.rootDeviceIndex , 1u /* num gmms*/ , allocationData.type , bo.get (), nullptr , 0u , bufferSize, memoryPool);
799799 allocation->setDefaultGmm (gmm.release ());
@@ -842,7 +842,7 @@ GraphicsAllocation *DrmMemoryManager::allocateMemoryByKMD(const AllocationData &
842842 boType = BufferObject::BOType::legacy;
843843 }
844844
845- std::unique_ptr <BufferObject, BufferObject::Deleter> bo ( new BufferObject ( allocationData.rootDeviceIndex , &drm, patIndex, handle, bufferSize, maxOsContextCount) );
845+ auto bo = std::make_unique <BufferObject>( allocationData.rootDeviceIndex , &drm, patIndex, handle, bufferSize, maxOsContextCount);
846846 bo->setAddress (gpuRange);
847847 bo->setBOType (boType);
848848
@@ -2683,7 +2683,7 @@ GraphicsAllocation *DrmMemoryManager::createSharedUnifiedMemoryAllocation(const
26832683 return nullptr ;
26842684 }
26852685
2686- std::unique_ptr <BufferObject, BufferObject::Deleter> bo ( new BufferObject ( allocationData.rootDeviceIndex , &drm, patIndex, handle, currentSize, maxOsContextCount) );
2686+ auto bo = std::make_unique <BufferObject>( allocationData.rootDeviceIndex , &drm, patIndex, handle, currentSize, maxOsContextCount);
26872687
26882688 if (vmAdviseAttribute.has_value () && !ioctlHelper->setVmBoAdvise (bo->peekHandle (), vmAdviseAttribute.value (), nullptr )) {
26892689 ioctlHelper->munmapFunction (*this , cpuBasePointer, totalSizeToAlloc);
0 commit comments