MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / WriteMagicValueAfterAllocation

Method WriteMagicValueAfterAllocation

include/vk_mem_alloc.h:10835–10850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10833}
10834
10835VkResult VmaDeviceMemoryBlock::WriteMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize)
10836{
10837 VMA_ASSERT(VMA_DEBUG_MARGIN > 0 && VMA_DEBUG_MARGIN % 4 == 0 && VMA_DEBUG_DETECT_CORRUPTION);
10838
10839 void* pData = VMA_NULL;
10840 VkResult res = Map(hAllocator, 1, &pData);
10841 if (res != VK_SUCCESS)
10842 {
10843 return res;
10844 }
10845
10846 VmaWriteMagicValue(pData, allocOffset + allocSize);
10847
10848 Unmap(hAllocator, 1);
10849 return VK_SUCCESS;
10850}
10851
10852VkResult VmaDeviceMemoryBlock::ValidateMagicValueAfterAllocation(VmaAllocator hAllocator, VkDeviceSize allocOffset, VkDeviceSize allocSize)
10853{

Callers 1

Calls 2

VmaWriteMagicValueFunction · 0.85
MapClass · 0.50

Tested by

no test coverage detected