XMemGetAllocationStatistics

Queries the hysteresis amount for a given heap.

Syntax

BOOL XMemGetAllocationStatistics(
         DWORD dwMemType,
         BOOL bLargeHeap,
         PXMEM_HEAP_STATISTICS lpStatistics
)  

Parameters

dwMemType
Type: DWORD 

[in] Refers to the XALLOC_MEMTYPE_GRAPHICS constant describing the heap.

bLargeHeap
Type: BOOL 

[in] True if the heap is “large”; where “large” heaps are used to satisfy allocations that are 4 KB to 128 KB, or whose alignment is specified as 4 KB or higher; and “small” heaps are used to satisfy allocations that are smaller than 4 KB and whose alignment is specified as less than 4 KB.

lpStatistics
Type: PXMEM_HEAP_STATISTICS 

[in, out] Pointer to the XMEM_HEAP_STATISTICS structure to contain the statistics.

Return value

Type: BOOL 

Returns TRUE if the XMEM_HEAP_STATISTICS structure could be populated, else FALSE.

Example

XMEM_HEAP_STATISTICS statistics;
statistics.dwSize = sizeof( statistics );
BOOL success = XMemGetAllocationStatistics(XALLOC_MEMTYPE_GRAPHICS_WRITECOMBINE, TRUE, &statistics);  

Requirements

Header: Declared in xmem.h.