SWDEV-522707 - Set phys_mem_handle type to sizeof(size_t) to avoid blocking address range. (#105)
This commit is contained in:
committed by
GitHub
vanhempi
b2388dfb88
commit
6811fd90b8
@@ -254,7 +254,6 @@ class Memory : public amd::RuntimeObject {
|
||||
|
||||
//! Initializes the device memory array
|
||||
virtual void initDeviceMemory();
|
||||
|
||||
void setSize(size_t size) { size_ = size; }
|
||||
void setInteropObj(InteropObject* obj) { interopObj_ = obj; }
|
||||
|
||||
@@ -339,6 +338,13 @@ class Memory : public amd::RuntimeObject {
|
||||
Flags getMemFlags() const { return flags_; }
|
||||
Type getType() const { return type_; }
|
||||
|
||||
//! Update phys mem size to the handle, only when the ROCCLR_MEM_PHYSMEM flag is set.
|
||||
void UpdatePhysMemSize() {
|
||||
if (flags_ & ROCCLR_MEM_PHYMEM) {
|
||||
size_ = sizeof(getUserData().hsa_handle);
|
||||
}
|
||||
}
|
||||
|
||||
const Device* getLastWriter() { return lastWriter_; }
|
||||
const HostMemoryReference* getHostMemRef() const { return &hostMemRef_; }
|
||||
void* getHostMem() const { return hostMemRef_.hostMem(); }
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user