XMEM_HEAP_STATISTICS Structure

A statistics structure for a given heap.

Syntax

typedef struct _XMEM_HEAP_STATISTICS {
    ULONG dwSize;
    SIZE_T dwMaximumAllocatedSize;
    SIZE_T dwMinimumFreeDepth;
    ULONG dwAllocationCount;
    ULONG dwFreeCount;
} XMEM_HEAP_STATISTICS, *PXMEM_HEAP_STATISTICS;  

Members

dwSize
The size of the XMEM_HEAP_STATISTICS structure. This member must be set before passing the structure to XMemGetAllocationStatistics.

dwMaximumAllocatedSize
The maximum size to which the heap has ever grown, in bytes.

dwMinimumFreeDepth
The amount of free memory that was never put to use, in bytes. It is reset after every call to change the hysteresis amount or to preallocate pages. If this number is non-zero, it means that hysteresis is set too high because there are allocated pages that were never used.

dwAllocationCount
The number of times this heap has called the kernel asking for memory.

dwFreeCount
The number of times this heap has called the kernel to return memory.

Example

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

Requirements

Header: Declared in xmem.h.