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