mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-09 14:10:08 +00:00
Fixed incorrect counting of m_BlocksFreeSize when merging margin blocks.
Code by @medranSolus
This commit is contained in:
parent
4b01ef07ef
commit
99d6fcb985
@ -10587,9 +10587,10 @@ void VmaBlockMetadata_TLSF::Free(VmaAllocHandle allocHandle)
|
||||
VkDeviceSize debugMargin = GetDebugMargin();
|
||||
if (debugMargin > 0)
|
||||
{
|
||||
VMA_ASSERT(next->size == debugMargin);
|
||||
// Adjust stats for one less block
|
||||
--m_BlocksFreeCount;
|
||||
m_BlocksFreeSize -= block->size;
|
||||
m_BlocksFreeSize -= debugMargin;
|
||||
MergeBlock(next, block);
|
||||
block = next;
|
||||
next = next->nextPhysical;
|
||||
|
Loading…
Reference in New Issue
Block a user