Skip to main content

XMemPreallocateFreeSpace

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

Syntax

Parameters

MemType   _In_
Type: DWORD
The XALLOC_MEMTYPE_GRAPHICS constant that describes the heap. For more information, see XALLOC_ATTRIBUTES. LargeHeap   _In_
Type: BOOL
Indicates whether the heap is “large”. If set to true, the heap is considered “large”; otherwise, the heap is considered “small”. “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; otherwise, FALSE.

Remarks

This function allocates free space for the heap described in MemType, up to the hysteresis amount for that heap. Use XMemGetAllocationHysteresis to get the hysteresis amount for a heap, or XMemSetAllocationHysteresis to specify the hysteresis amount for a heap. For more information, see Memory.

Requirements

Header: xmem.h Library: xmem.lib Supported platforms: XBOX One family consoles and XBOX Series consoles

See also

XALLOC_ATTRIBUTES
XMem
Last modified on August 20, 2026