SWDEV-532479 - Add tracking of hostcall memory allocations (#416)

* SWDEV-532479 - Add tracking of hostcall memory allocations

* SWDEV-532479 - Remove hostcall allocations if request is received

* SWDEV-532479 - Cleanup

* SWDEV-532479 - Naming fix

* SWDEV-532479 - Add new separator after each new function

[ROCm/clr commit: b58faa2f37]
此提交包含在:
Arandjelovic, Marko
2025-08-15 00:17:24 +02:00
提交者 GitHub
父節點 2b79ca9435
當前提交 c33359ec62
共有 3 個檔案被更改,包括 35 行新增 和 1 行删除
+2
查看文件
@@ -94,6 +94,7 @@ static void handlePayload(MessageHandler& messages, uint32_t service, uint64_t*
if (payload[0]) {
amd::Memory* mem = amd::MemObjMap::FindMemObj(reinterpret_cast<void*>(payload[0]));
if (mem) {
const_cast<amd::Device*>(&dev)->RemoveHostcallMemory(mem);
amd::MemObjMap::RemoveMemObj(reinterpret_cast<void*>(payload[0]));
mem->release();
} else {
@@ -110,6 +111,7 @@ static void handlePayload(MessageHandler& messages, uint32_t service, uint64_t*
device::Memory* dm = buf->getDeviceMemory(dev);
va = dm->virtualAddress();
amd::MemObjMap::AddMemObj(reinterpret_cast<void*>(va), buf);
const_cast<amd::Device*>(&dev)->TrackHostcallMemory(buf);
} else {
buf->release();
}