Skip to content

Commit a7fa9d7

Browse files
Delete freeGmm interface.
Change-Id: I9a3ce6f6076d5accf69be2be50126a46f9bde23d
1 parent 3614b2a commit a7fa9d7

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

runtime/memory_manager/memory_manager.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include "runtime/event/event.h"
1111
#include "runtime/event/hw_timestamps.h"
1212
#include "runtime/event/perf_counter.h"
13-
#include "runtime/gmm_helper/gmm.h"
14-
#include "runtime/gmm_helper/resource_info.h"
1513
#include "runtime/helpers/aligned_memory.h"
1614
#include "runtime/helpers/basic_math.h"
1715
#include "runtime/helpers/kernel_commands.h"
@@ -116,10 +114,6 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemoryForSVM(size_t size, boo
116114
return graphicsAllocation;
117115
}
118116

119-
void MemoryManager::freeGmm(GraphicsAllocation *gfxAllocation) {
120-
delete gfxAllocation->gmm;
121-
}
122-
123117
GraphicsAllocation *MemoryManager::allocateGraphicsMemory(size_t size, const void *ptr, bool forcePin) {
124118
std::lock_guard<decltype(mtx)> lock(mtx);
125119
auto requirements = HostPtrManager::getAllocationRequirements(ptr, size);

runtime/memory_manager/memory_manager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ class MemoryManager {
194194

195195
void checkGpuUsageAndDestroyGraphicsAllocations(GraphicsAllocation *gfxAllocation);
196196

197-
void freeGmm(GraphicsAllocation *gfxAllocation);
198-
199197
virtual uint64_t getSystemSharedMemory() = 0;
200198

201199
virtual uint64_t getMaxApplicationAddress() = 0;

runtime/memory_manager/os_agnostic_memory_manager.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "runtime/memory_manager/os_agnostic_memory_manager.h"
99
#include "runtime/gmm_helper/gmm.h"
1010
#include "runtime/gmm_helper/gmm_helper.h"
11+
#include "runtime/gmm_helper/resource_info.h"
1112
#include "runtime/helpers/aligned_memory.h"
1213
#include "runtime/helpers/basic_math.h"
1314
#include "runtime/helpers/options.h"
@@ -140,8 +141,9 @@ void OsAgnosticMemoryManager::removeAllocationFromHostPtrManager(GraphicsAllocat
140141
void OsAgnosticMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation) {
141142
if (gfxAllocation == nullptr)
142143
return;
143-
if (gfxAllocation->gmm)
144-
freeGmm(gfxAllocation);
144+
145+
delete gfxAllocation->gmm;
146+
145147
if ((uintptr_t)gfxAllocation->getUnderlyingBuffer() == dummyAddress) {
146148
delete gfxAllocation;
147149
return;

0 commit comments

Comments
 (0)