OsAgnosticMemoryManager to call freeMemory on AubManager

Resolves: NEO-3231

Change-Id: I89a3cc9f2a63931c6c87ec70bbedc19716a885c1
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2019-05-29 16:20:50 +02:00
parent 7cc855cc72
commit 17f9cc006d
6 changed files with 33 additions and 8 deletions

View File

@@ -9,6 +9,7 @@
#include "core/helpers/basic_math.h"
#include "core/helpers/ptr_math.h"
#include "runtime/aub/aub_center.h"
#include "runtime/execution_environment/execution_environment.h"
#include "runtime/gmm_helper/gmm.h"
#include "runtime/gmm_helper/gmm_helper.h"
@@ -199,6 +200,12 @@ void OsAgnosticMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllo
if (gfxAllocation->getReservedAddressPtr()) {
releaseReservedCpuAddressRange(gfxAllocation->getReservedAddressPtr(), gfxAllocation->getReservedAddressSize());
}
auto aubCenter = executionEnvironment.aubCenter.get();
if (aubCenter && aubCenter->getAubManager()) {
aubCenter->getAubManager()->freeMemory(gfxAllocation->getGpuAddress(), gfxAllocation->getUnderlyingBufferSize());
}
delete gfxAllocation;
}