MCPcopy Create free account
hub / github.com/Inori/GPCS4 / shouldFreeEmptyChunks

Method shouldFreeEmptyChunks

GPCS4/Graphics/Violet/VltMemory.cpp:574–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 2

tryAllocFromTypeMethod · 0.95
shouldFreeChunkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected