MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / Init

Method Init

modules/engine/graphics/src/d3d12/D3D12MemAlloc.cpp:3159–3178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3157}
3158
3159void BlockMetadata_Generic::Init(UINT64 size)
3160{
3161 BlockMetadata::Init(size);
3162 m_ZeroInitializedRange.Reset(size);
3163
3164 m_FreeCount = 1;
3165 m_SumFreeSize = size;
3166
3167 Suballocation suballoc = {};
3168 suballoc.offset = 0;
3169 suballoc.size = size;
3170 suballoc.type = SUBALLOCATION_TYPE_FREE;
3171 suballoc.privateData = NULL;
3172
3173 D3D12MA_ASSERT(size > MIN_FREE_SUBALLOCATION_SIZE_TO_REGISTER);
3174 m_Suballocations.push_back(suballoc);
3175 SuballocationList::iterator suballocItem = m_Suballocations.end();
3176 --suballocItem;
3177 m_FreeSuballocationsBySize.push_back(suballocItem);
3178}
3179
3180bool BlockMetadata_Generic::Validate() const
3181{

Callers 6

bindMethod · 0.45
AllocatorPimplMethod · 0.45
VirtualBlockPimplMethod · 0.45
NormalBlockClass · 0.45
CreateAllocatorMethod · 0.45
ParseDracoExtensionFunction · 0.45

Calls 6

memsetFunction · 0.85
ResetMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45
AllocMethod · 0.45
MarkFreeMethod · 0.45

Tested by

no test coverage detected