Skip to content

Commit 418a032

Browse files
Fixed typo in VmaBlockMetadata_TLSF::Alloc
Based on #460
1 parent 7ab8483 commit 418a032

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/vk_mem_alloc.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9316,28 +9316,28 @@ void VmaBlockMetadata_TLSF::Alloc(
93169316
RemoveFreeBlock(currentBlock);
93179317

93189318
VkDeviceSize debugMargin = GetDebugMargin();
9319-
VkDeviceSize misssingAlignment = offset - currentBlock->offset;
9319+
VkDeviceSize missingAlignment = offset - currentBlock->offset;
93209320

93219321
// Append missing alignment to prev block or create new one
9322-
if (misssingAlignment)
9322+
if (missingAlignment)
93239323
{
93249324
Block* prevBlock = currentBlock->prevPhysical;
93259325
VMA_ASSERT(prevBlock != VMA_NULL && "There should be no missing alignment at offset 0!");
93269326

93279327
if (prevBlock->IsFree() && prevBlock->size != debugMargin)
93289328
{
93299329
uint32_t oldList = GetListIndex(prevBlock->size);
9330-
prevBlock->size += misssingAlignment;
9330+
prevBlock->size += missingAlignment;
93319331
// Check if new size crosses list bucket
93329332
if (oldList != GetListIndex(prevBlock->size))
93339333
{
9334-
prevBlock->size -= misssingAlignment;
9334+
prevBlock->size -= missingAlignment;
93359335
RemoveFreeBlock(prevBlock);
9336-
prevBlock->size += misssingAlignment;
9336+
prevBlock->size += missingAlignment;
93379337
InsertFreeBlock(prevBlock);
93389338
}
93399339
else
9340-
m_BlocksFreeSize += misssingAlignment;
9340+
m_BlocksFreeSize += missingAlignment;
93419341
}
93429342
else
93439343
{
@@ -9346,15 +9346,15 @@ void VmaBlockMetadata_TLSF::Alloc(
93469346
prevBlock->nextPhysical = newBlock;
93479347
newBlock->prevPhysical = prevBlock;
93489348
newBlock->nextPhysical = currentBlock;
9349-
newBlock->size = misssingAlignment;
9349+
newBlock->size = missingAlignment;
93509350
newBlock->offset = currentBlock->offset;
93519351
newBlock->MarkTaken();
93529352

93539353
InsertFreeBlock(newBlock);
93549354
}
93559355

9356-
currentBlock->size -= misssingAlignment;
9357-
currentBlock->offset += misssingAlignment;
9356+
currentBlock->size -= missingAlignment;
9357+
currentBlock->offset += missingAlignment;
93589358
}
93599359

93609360
VkDeviceSize size = request.size + debugMargin;

0 commit comments

Comments
 (0)