Direct3D 12 Memory Allocator
|
Custom memory pool. More...
#include <D3D12MemAlloc.h>
Public Member Functions | |
POOL_DESC | GetDesc () const |
Returns copy of parameters of the pool. | |
void | GetStatistics (Statistics *pStats) |
Retrieves basic statistics of the custom pool that are fast to calculate. | |
void | CalculateStatistics (DetailedStatistics *pStats) |
Retrieves detailed statistics of the custom pool that are slower to calculate. | |
void | SetName (LPCWSTR Name) |
Associates a name with the pool. This name is for use in debug diagnostics and tools. | |
LPCWSTR | GetName () const |
Returns the name associated with the pool object. | |
HRESULT | BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext) |
Begins defragmentation process of the current pool. | |
Custom memory pool.
Represents a separate set of heaps (memory blocks) that can be used to create D3D12MA::Allocation-s and resources in it. Usually there is no need to create custom pools - creating resources in default pool is sufficient.
To create custom pool, fill D3D12MA::POOL_DESC and call D3D12MA::Allocator::CreatePool.
HRESULT D3D12MA::Pool::BeginDefragmentation | ( | const DEFRAGMENTATION_DESC * | pDesc, |
DefragmentationContext ** | ppContext ) |
Begins defragmentation process of the current pool.
pDesc | Structure filled with parameters of defragmentation. | |
[out] | ppContext | Context object that will manage defragmentation. |
S_OK
if defragmentation can begin.E_NOINTERFACE
if defragmentation is not supported.For more information about defragmentation, see documentation chapter: Defragmentation.
void D3D12MA::Pool::CalculateStatistics | ( | DetailedStatistics * | pStats | ) |
Retrieves detailed statistics of the custom pool that are slower to calculate.
[out] | pStats | Statistics of the current pool. |
POOL_DESC D3D12MA::Pool::GetDesc | ( | ) | const |
Returns copy of parameters of the pool.
These are the same parameters as passed to D3D12MA::Allocator::CreatePool.
LPCWSTR D3D12MA::Pool::GetName | ( | ) | const |
Returns the name associated with the pool object.
Returned string points to an internal copy.
If no name was associated with the allocation, returns NULL.
void D3D12MA::Pool::GetStatistics | ( | Statistics * | pStats | ) |
Retrieves basic statistics of the custom pool that are fast to calculate.
[out] | pStats | Statistics of the current pool. |
void D3D12MA::Pool::SetName | ( | LPCWSTR | Name | ) |
Associates a name with the pool. This name is for use in debug diagnostics and tools.
Internal copy of the string is made, so the memory pointed by the argument can be changed of freed immediately after this call.
Name
can be NULL.