mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Unbind unused resources when running out of memory
Resolves: NEO-5052 Change-Id: I3a07221b800317c79e65396443933d13d334a274 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
d363448515
commit
a528908cbd
@ -404,9 +404,11 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryInPreferredPool(const A
|
||||
GraphicsAllocation *allocation = allocateGraphicsMemoryInDevicePool(allocationData, status);
|
||||
if (allocation) {
|
||||
localMemoryUsageBankSelector[properties.rootDeviceIndex]->reserveOnBanks(allocationData.storageInfo.getMemoryBanks(), allocation->getUnderlyingBufferSize());
|
||||
this->registerLocalMemAlloc(allocation, properties.rootDeviceIndex);
|
||||
}
|
||||
if (!allocation && status == AllocationStatus::RetryInNonDevicePool) {
|
||||
allocation = allocateGraphicsMemory(allocationData);
|
||||
this->registerSysMemAlloc(allocation);
|
||||
}
|
||||
FileLoggerInstance().logAllocation(allocation);
|
||||
return allocation;
|
||||
|
Reference in New Issue
Block a user