|
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 | *
|
@@ -793,7 +793,7 @@ GraphicsAllocation *DrmMemoryManager::allocatePhysicalDeviceMemory(const Allocat
|
793 | 793 | auto isCoherent = productHelper.isCoherentAllocation(patIndex);
|
794 | 794 | uint32_t handle = ioctlHelper->createGem(bufferSize, static_cast<uint32_t>(allocationData.storageInfo.memoryBanks.to_ulong()), isCoherent);
|
795 | 795 |
|
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); |
797 | 797 |
|
798 | 798 | auto allocation = new DrmAllocation(allocationData.rootDeviceIndex, 1u /*num gmms*/, allocationData.type, bo.get(), nullptr, 0u, bufferSize, memoryPool);
|
799 | 799 | allocation->setDefaultGmm(gmm.release());
|
@@ -842,7 +842,7 @@ GraphicsAllocation *DrmMemoryManager::allocateMemoryByKMD(const AllocationData &
|
842 | 842 | boType = BufferObject::BOType::legacy;
|
843 | 843 | }
|
844 | 844 |
|
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); |
846 | 846 | bo->setAddress(gpuRange);
|
847 | 847 | bo->setBOType(boType);
|
848 | 848 |
|
@@ -2683,7 +2683,7 @@ GraphicsAllocation *DrmMemoryManager::createSharedUnifiedMemoryAllocation(const
|
2683 | 2683 | return nullptr;
|
2684 | 2684 | }
|
2685 | 2685 |
|
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); |
2687 | 2687 |
|
2688 | 2688 | if (vmAdviseAttribute.has_value() && !ioctlHelper->setVmBoAdvise(bo->peekHandle(), vmAdviseAttribute.value(), nullptr)) {
|
2689 | 2689 | ioctlHelper->munmapFunction(*this, cpuBasePointer, totalSizeToAlloc);
|
|
0 commit comments