Record interop mapped object in allocation_map_

This allows the VA to be recorded in ROCr so that they are not
treated as an invalid pointer in future API calls.

Change-Id: I8d1d8ef9816a984c89d30a2179b0ce8940fef1da


[ROCm/ROCR-Runtime commit: f2006d6899]
这个提交包含在:
Shweta Khatri 编写, David Yat Sin 于 2024-02-26 13:40:55 -05:00 提交
1 父节点 c85e1dc4cd
当前提交 a0ebf06e6e
1 个文件已更改
+4
@@ -833,6 +833,10 @@ hsa_status_t Runtime::InteropMap(uint32_t num_agents, Agent** agents,
*size = info.SizeInBytes;
*ptr = info.MemoryAddress;
ScopedAcquire<KernelSharedMutex> lock(&memory_lock_);
allocation_map_[info.MemoryAddress] = AllocationRegion(
nullptr, info.SizeInBytes, info.SizeInBytes, core::MemoryRegion::AllocateNoFlags);
return HSA_STATUS_SUCCESS;
}