SWDEV-374360 - Handle free for external memory.

Change-Id: I4a1ede2210a255960d7a935cd4debb806e0147f6
Этот коммит содержится в:
Jaydeep Patel
2023-01-13 13:29:26 +00:00
коммит произвёл Jaydeepkumar Patel
родитель 033d4c0463
Коммит d97b4e8c74
-9
Просмотреть файл
@@ -305,11 +305,6 @@ bool Memory::create(void* initFrom, bool sysMemAlloc, bool skipAlloc, bool force
LogPrintfError("Can't allocate memory size - 0x%08X bytes!", getSize());
return false;
}
if (amd::IS_HIP && isInterop()) {
// Interop resources dont' have svm allocations, we use device address for mapping.
amd::MemObjMap::AddMemObj(
reinterpret_cast<void*>(static_cast<uintptr_t>(mem->virtualAddress())), this);
}
}
}
@@ -423,10 +418,6 @@ Memory::~Memory() {
if (NULL != deviceMemories_) {
// Destroy all device memory objects
for (uint i = 0; i < numDevices_; ++i) {
if (amd::IS_HIP && isInterop() && deviceMemories_[i].value_ != nullptr) {
amd::MemObjMap::RemoveMemObj(reinterpret_cast<void*>(
static_cast<uintptr_t>(deviceMemories_[i].value_->virtualAddress())));
}
delete deviceMemories_[i].value_;
}
}