mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
[29/n] Internal 4GB allocator.
- Internal allocations may now coexists with non internal on reusable list. - Caller now specifies if internal allocation is needed. - If criteria are not met , then allocation is not returned. Change-Id: I7da3a4f944768b7c8a873e44fd47248f1d76bf9e
This commit is contained in:
@ -1775,7 +1775,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, InForced32BitAllocationsModeDoNotS
|
||||
auto newScratchAllocation = commandStreamReceiver->getScratchAllocation();
|
||||
EXPECT_NE(scratchAllocation, newScratchAllocation); // Allocation changed
|
||||
|
||||
std::unique_ptr<GraphicsAllocation> allocationReusable = pDevice->getMemoryManager()->obtainReusableAllocation(4096);
|
||||
std::unique_ptr<GraphicsAllocation> allocationReusable = pDevice->getMemoryManager()->obtainReusableAllocation(4096, false);
|
||||
|
||||
if (allocationReusable.get() != nullptr) {
|
||||
if (is64bit) {
|
||||
@ -1809,7 +1809,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, InForced32BitAllocationsModeStore3
|
||||
auto newScratchAllocation = commandStreamReceiver->getScratchAllocation();
|
||||
EXPECT_NE(scratchAllocation, newScratchAllocation); // Allocation changed
|
||||
|
||||
std::unique_ptr<GraphicsAllocation> allocationTemporary = pDevice->getMemoryManager()->graphicsAllocations.detachAllocation(0, nullptr);
|
||||
std::unique_ptr<GraphicsAllocation> allocationTemporary = pDevice->getMemoryManager()->graphicsAllocations.detachAllocation(0, nullptr, true);
|
||||
|
||||
EXPECT_EQ(scratchAllocation, allocationTemporary.get());
|
||||
pDevice->getMemoryManager()->freeGraphicsMemory(allocationTemporary.release());
|
||||
|
Reference in New Issue
Block a user