MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / AddStatistics

Method AddStatistics

include/vk_mem_alloc.h:6872–6886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6870}
6871
6872void VmaDedicatedAllocationList::AddStatistics(VmaStatistics& inoutStats)
6873{
6874 VmaMutexLockRead lock(m_Mutex, m_UseMutex);
6875
6876 const uint32_t allocCount = (uint32_t)m_AllocationList.GetCount();
6877 inoutStats.blockCount += allocCount;
6878 inoutStats.allocationCount += allocCount;
6879
6880 for(auto* item = m_AllocationList.Front(); item != VMA_NULL; item = DedicatedAllocationLinkedList::GetNext(item))
6881 {
6882 const VkDeviceSize size = item->GetSize();
6883 inoutStats.blockBytes += size;
6884 inoutStats.allocationBytes += size;
6885 }
6886}
6887
6888#if VMA_STATS_STRING_ENABLED
6889void VmaDedicatedAllocationList::BuildStatsString(VmaJsonWriter& json)

Callers 2

GetStatisticsMethod · 0.80
GetPoolStatisticsMethod · 0.80

Calls 5

ValidateMethod · 0.80
GetCountMethod · 0.45
FrontMethod · 0.45
GetSizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected