Added benchmark for linear allocator.
This commit is contained in:
parent
dedab850e9
commit
0a60713b07
4 changed files with 200 additions and 18 deletions
|
@ -641,7 +641,7 @@ you can achieve behavior of a ring buffer / queue.
|
|||
|
||||

|
||||
|
||||
Pools with linear algorithm support lost allocations when used as ring buffer.
|
||||
Pools with linear algorithm support [lost allocations](@ref lost_allocations) when used as ring buffer.
|
||||
If there is not enough free space for a new allocation, but existing allocations
|
||||
from the front of the queue can become lost, they become lost and the allocation
|
||||
succeeds.
|
||||
|
@ -8333,7 +8333,7 @@ bool VmaBlockMetadata_Linear::CreateAllocationRequest(
|
|||
for(size_t nextSuballocIndex = suballocations2nd.size(); nextSuballocIndex--; )
|
||||
{
|
||||
const VmaSuballocation& nextSuballoc = suballocations2nd[nextSuballocIndex];
|
||||
if(VmaBlocksOnSamePage(nextSuballoc.offset, nextSuballoc.size, resultOffset, bufferImageGranularity))
|
||||
if(VmaBlocksOnSamePage(resultOffset, allocSize, nextSuballoc.offset, bufferImageGranularity))
|
||||
{
|
||||
if(VmaIsBufferImageGranularityConflict(nextSuballoc.type, allocType))
|
||||
{
|
||||
|
@ -8364,7 +8364,7 @@ bool VmaBlockMetadata_Linear::CreateAllocationRequest(
|
|||
for(size_t prevSuballocIndex = suballocations1st.size(); prevSuballocIndex--; )
|
||||
{
|
||||
const VmaSuballocation& prevSuballoc = suballocations1st[prevSuballocIndex];
|
||||
if(VmaBlocksOnSamePage(resultOffset, allocSize, prevSuballoc.offset, bufferImageGranularity))
|
||||
if(VmaBlocksOnSamePage(prevSuballoc.offset, prevSuballoc.size, resultOffset, bufferImageGranularity))
|
||||
{
|
||||
if(VmaIsBufferImageGranularityConflict(allocType, prevSuballoc.type))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue