Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
D3D12MA::Pool Class Reference

Custom memory pool. More...

#include <D3D12MemAlloc.h>

Inherits IUnknownImpl.

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.
 

Protected Member Functions

void ReleaseThis () override
 

Friends

class Allocator
 
class AllocatorPimpl
 
template<typename T >
void D3D12MA_DELETE (const ALLOCATION_CALLBACKS &, T *)
 

Detailed Description

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.

Member Function Documentation

◆ BeginDefragmentation()

HRESULT D3D12MA::Pool::BeginDefragmentation ( const DEFRAGMENTATION_DESC pDesc,
DefragmentationContext **  ppContext 
)

Begins defragmentation process of the current pool.

Parameters
pDescStructure filled with parameters of defragmentation.
[out]ppContextContext object that will manage defragmentation.
Returns
  • S_OK if defragmentation can begin.
  • E_NOINTERFACE if defragmentation is not supported.

For more information about defragmentation, see documentation chapter: Defragmentation.

◆ CalculateStatistics()

void D3D12MA::Pool::CalculateStatistics ( DetailedStatistics pStats)

Retrieves detailed statistics of the custom pool that are slower to calculate.

Parameters
[out]pStatsStatistics of the current pool.

◆ GetDesc()

POOL_DESC D3D12MA::Pool::GetDesc ( ) const

Returns copy of parameters of the pool.

These are the same parameters as passed to D3D12MA::Allocator::CreatePool.

◆ GetName()

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.

◆ GetStatistics()

void D3D12MA::Pool::GetStatistics ( Statistics pStats)

Retrieves basic statistics of the custom pool that are fast to calculate.

Parameters
[out]pStatsStatistics of the current pool.

◆ SetName()

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.


The documentation for this class was generated from the following file: