|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2018-2024 Intel Corporation |
| 2 | + * Copyright (C) 2018-2025 Intel Corporation |
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: MIT
|
5 | 5 | *
|
@@ -792,7 +792,7 @@ GraphicsAllocation *DrmMemoryManager::allocatePhysicalDeviceMemory(const Allocat
|
792 | 792 | auto isCoherent = productHelper.isCoherentAllocation(patIndex);
|
793 | 793 | uint32_t handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()), isCoherent);
|
794 | 794 |
|
795 |
| - std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount)); |
| 795 | + auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount); |
796 | 796 |
|
797 | 797 | auto allocation = new DrmAllocation(allocationData.rootDeviceIndex, 1u /*num gmms*/, allocationData.type, bo.get(), nullptr, 0u, bufferSize, memoryPool);
|
798 | 798 | allocation->setDefaultGmm(gmm.release());
|
@@ -841,7 +841,7 @@ GraphicsAllocation *DrmMemoryManager::allocateMemoryByKMD(const AllocationData &
|
841 | 841 | boType = BufferObject::BOType::legacy;
|
842 | 842 | }
|
843 | 843 |
|
844 |
| - std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount)); |
| 844 | + auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, bufferSize, maxOsContextCount); |
845 | 845 | bo->setAddress(gpuRange);
|
846 | 846 | bo->setBOType(boType);
|
847 | 847 |
|
@@ -2682,7 +2682,7 @@ GraphicsAllocation *DrmMemoryManager::createSharedUnifiedMemoryAllocation(const
|
2682 | 2682 | return nullptr;
|
2683 | 2683 | }
|
2684 | 2684 |
|
2685 |
| - std::unique_ptr<BufferObject, BufferObject::Deleter> bo(new BufferObject(allocationData.rootDeviceIndex, &drm, patIndex, handle, currentSize, maxOsContextCount)); |
| 2685 | + auto bo = std::make_unique<BufferObject>(allocationData.rootDeviceIndex, &drm, patIndex, handle, currentSize, maxOsContextCount); |
2686 | 2686 |
|
2687 | 2687 | if (vmAdviseAttribute.has_value() && !ioctlHelper->setVmBoAdvise(bo->peekHandle(), vmAdviseAttribute.value(), nullptr)) {
|
2688 | 2688 | ioctlHelper->munmapFunction(*this, cpuBasePointer, totalSizeToAlloc);
|
|
0 commit comments