Release host buffers after segment freeze.

Release staging buffers after loading has completed.  The debugger
no longer uses this copy.

Change-Id: I46f36b50033bebe5a9ebc648b291d46f1d09b21d


[ROCm/ROCR-Runtime commit: 03a52655a8]
Esse commit está contido em:
Sean Keely
2022-03-23 23:31:04 -05:00
commit cf3f441625
@@ -358,6 +358,10 @@ bool RegionMemory::Freeze() {
memcpy(ptr_, host_ptr_, size_);
}
// Free host buffer
HSA::hsa_memory_free(host_ptr_);
host_ptr_ = nullptr;
// Invalidate agent caches which may hold lines of the new allocation.
if (is_code_ && (region_->owner()->device_type() == core::Agent::kAmdGpuDevice))
((AMD::GpuAgent*)region_->owner())->InvalidateCodeCaches();