Open 3D Engine Atom Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
Custom memory pool. More...
#include <D3D12MemAlloc.h>
Inherits IUnknownImpl.
Public Member Functions | |
POOL_DESC | GetDesc () const |
Returns copy of parameters of the pool. More... | |
void | GetStatistics (Statistics *pStats) |
Retrieves basic statistics of the custom pool that are fast to calculate. More... | |
void | CalculateStatistics (DetailedStatistics *pStats) |
Retrieves detailed statistics of the custom pool that are slower to calculate. More... | |
void | SetName (LPCWSTR Name) |
Associates a name with the pool. This name is for use in debug diagnostics and tools. More... | |
LPCWSTR | GetName () const |
Returns the name associated with the pool object. More... | |
HRESULT | BeginDefragmentation (const DEFRAGMENTATION_DESC *pDesc, DefragmentationContext **ppContext) |
Begins defragmentation process of the current pool. More... | |
Protected Member Functions | |
void | ReleaseThis () override |
Friends | |
class | Allocator |
class | AllocatorPimpl |
template<typename T > | |
void | D3D12MA_DELETE (const ALLOCATION_CALLBACKS &, T *) |
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.