XMemPreallocateFreeSpace

Allocates free pages for a heap up to its hysteresis value.

Syntax

BOOL XMemPreallocateFreeSpace(
         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: BOOL 

Returns TRUE if all pages could be allocated, else FALSE.

Requirements

Header: Declared in xmem.h.