| 572 | } |
| 573 | |
| 574 | bool VltMemoryAllocator::shouldFreeEmptyChunks( |
| 575 | const VltMemoryHeap* heap, |
| 576 | VkDeviceSize allocationSize) const |
| 577 | { |
| 578 | VkDeviceSize budget = heap->budget; |
| 579 | |
| 580 | if (!budget) |
| 581 | budget = (heap->properties.size * 4) / 5; |
| 582 | |
| 583 | return heap->stats.memoryAllocated + allocationSize > budget; |
| 584 | } |
| 585 | |
| 586 | void VltMemoryAllocator::freeEmptyChunks( |
| 587 | const VltMemoryHeap* heap) |
no outgoing calls
no test coverage detected