Direct3D 12 Memory Allocator
Loading...
Searching...
No Matches
Public Member Functions | List of all members
D3D12MA::Pool Class Reference

Custom memory pool. More...

#include <D3D12MemAlloc.h>

Inheritance diagram for D3D12MA::Pool:

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.
 

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: