SWDEV-311271 - Release freed memory from MemPools

Runtime has to release extra memory, held by the pools,
in synchronization points for event, stream or device.

Change-Id: Id533a5e1d137812aa72bdfe101b4b333c6a43d66
This commit is contained in:
German Andryeyev
2023-12-19 11:54:29 -05:00
committed by Rahul Garg
parent adf9406a16
commit 3fa4e31180
6 changed files with 23 additions and 13 deletions
+2 -2
View File
@@ -98,11 +98,11 @@ bool Device::FreeMemory(amd::Memory* memory, Stream* stream) {
}
// ================================================================================================
void Device::ReleaseFreedMemory(Stream* stream) {
void Device::ReleaseFreedMemory() {
amd::ScopedLock lock(lock_);
// Search for memory in the entire list of pools
for (auto it : mem_pools_) {
it->ReleaseFreedMemory(stream);
it->ReleaseFreedMemory();
}
}