You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So much has changed since the first release that it doesn’t make much sense to compare the differences. Here are the most important features that the library now provides:
4
+
5
+
- Powerful custom pools, which give an opportunity to not only keep certain resources together, reserve some minimum or limit the maximum amount of memory they can take, but also to pass additional allocation parameters unavailable to simple allocations. Among them, probably the most interesting is `POOL_DESC::HeapProperties`, which allows you to specify parameters of a custom memory type, which may be useful on UMA platforms. Committed allocations can now also be created in custom pools.
6
+
- The API for statistics and budget has been redesigned - see structures `Statistics`, `Budget`, `DetailedStatistics`, `TotalStatistics`.
7
+
- The library exposes its core allocation algorithm via the “virtual allocator” interface. This can be used to allocate pieces of custom memory or whatever you like, even something completely unrelated to graphics.
8
+
- The allocation algorithm has been replaced with the new, more efficient TLSF.
9
+
- Added support for defragmentation.
10
+
- Objects of the library can be used with smart pointers designed for COM objects.
<trclass="memdesc:a919d8545365d6b7209a964f2b99936d1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Bit flags to be used with POOL_DESC::Flags. <ahref="namespace_d3_d12_m_a.html#a919d8545365d6b7209a964f2b99936d1">More...</a><br/></td></tr>
<trclass="memdesc:ad5ae5a5e42b878f2e18ab5d1fbfb9916"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Bit flags to be used with ALLOCATOR_DESC::Flags. <ahref="namespace_d3_d12_m_a.html#ad5ae5a5e42b878f2e18ab5d1fbfb9916">More...</a><br/></td></tr>
<divclass="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><divclass="ttname"><ahref="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><divclass="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><divclass="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1055</div></div>
104
+
<divclass="ttc" id="aclass_d3_d12_m_a_1_1_allocator_html"><divclass="ttname"><ahref="class_d3_d12_m_a_1_1_allocator.html">D3D12MA::Allocator</a></div><divclass="ttdoc">Represents main object of this library initialized for particular ID3D12Device.</div><divclass="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1067</div></div>
105
105
<divclass="ttc" id="anamespace_d3_d12_m_a_html_ab7a1cd1683986d75ce1488b0920f4cb0"><divclass="ttname"><ahref="namespace_d3_d12_m_a.html#ab7a1cd1683986d75ce1488b0920f4cb0">D3D12MA::CreateAllocator</a></div><divclass="ttdeci">D3D12MA_API HRESULT CreateAllocator(const ALLOCATOR_DESC *pDesc, Allocator **ppAllocator)</div><divclass="ttdoc">Creates new main D3D12MA::Allocator object and returns it through ppAllocator.</div></div>
106
106
<divclass="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s_html"><divclass="ttname"><ahref="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_i_o_n___c_a_l_l_b_a_c_k_s.html">D3D12MA::ALLOCATION_CALLBACKS</a></div><divclass="ttdoc">Custom callbacks to CPU memory allocation functions.</div><divclass="ttdef"><b>Definition:</b> D3D12MemAlloc.h:187</div></div>
<divclass="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><divclass="ttname"><ahref="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><divclass="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><divclass="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1016</div></div>
<divclass="ttc" id="astruct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c_html"><divclass="ttname"><ahref="struct_d3_d12_m_a_1_1_a_l_l_o_c_a_t_o_r___d_e_s_c.html">D3D12MA::ALLOCATOR_DESC</a></div><divclass="ttdoc">Parameters of created Allocator object. To be used with CreateAllocator().</div><divclass="ttdef"><b>Definition:</b> D3D12MemAlloc.h:1028</div></div>
</div><!-- fragment --><h1><aclass="anchor" id="debug_margins"></a>
114
114
Debug margins</h1>
115
115
<p>By default, allocations are laid out in memory blocks next to each other if possible (considering required alignment returned by <code>ID3D12Device::GetResourceAllocationInfo</code>).</p>
0 commit comments