XMemGetAllocationHysteresis

Gets the hysteresis amount for a given heap, rounded up to an internal allocation boundary (4 MB).

Syntax

SIZE_T XMemGetAllocationHysteresis(
         DWORD dwMemType,
         BOOL bLargeHeap
)  

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.

Return value

Type: SIZE_T 

The amount of hysteresis (that is, the minimum amount of free memory that will be retained by the heap before additional free memory is returned to the operating system), in bytes. The heap implementation may round up the specified hysteresis amount to an internal allocation boundary (currently 4 MB).

Requirements

Header: Declared in xmem.h.