SWDEV-436236 - Fixed integer division to float result in Heap::FindMemory

Change-Id: Ic72cfdbe1f62fabd3e25d33bfa540d82a02480d0
Этот коммит содержится в:
Ioannis Assiouras committed 2023-12-06 12:41:00 -05:00
1 родитель a562194562
Коммит 2ede1c9adb
1 file changed
+1 -1
+1 -1
Просмотреть файл
@@ -50,7 +50,7 @@ amd::Memory* Heap::FindMemory(size_t size, hip::Stream* stream, bool opportunist
}
// Check if size can match and it's safe to use this resource.
// Runtime can accept an allocation with 12.5% on the size threshold
if ((it->first->getSize() >= size) && (it->first->getSize() <= (size / 8) * 9) &&
if ((it->first->getSize() >= size) && (it->first->getSize() <= (size / 8.0) * 9) &&
check_address && (it->second.IsSafeFind(stream, opportunistic))) {
memory = it->first;
total_size_ -= memory->getSize();