Add flag for external memory allocations

ROCr internally uses the same allocation_map_ list to track memory
allocations that are both for internal allocations and allocations by
users of ROCr library. In some edge cases, the library user would call
hsa_amd_pointer_info on an invalid pointer, but ROCR would return the
pointer as valid because this pointer belongs to a memory range that
was allocated internally within ROCr. Adding a flag to differentiate
between internal and external allocations.

Change-Id: I98c52bd85f3985d1ba1b0e3101d2254b003412cf
Bu işleme şunda yer alıyor:
David Yat Sin
2023-01-04 20:26:25 +00:00
ebeveyn 27596aef0c
işleme 59685f4492
5 değiştirilmiş dosya ile 28 ekleme ve 17 silme
+1 -1
Dosyayı Görüntüle
@@ -1092,7 +1092,7 @@ hsa_status_t
IS_VALID(mem_region);
return core::Runtime::runtime_singleton_->AllocateMemory(
mem_region, size, core::MemoryRegion::AllocateNoFlags, ptr);
mem_region, size, core::MemoryRegion::AllocateNoFlags, ptr, true);
CATCH;
}