> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XMemPreallocateFreeSpace

> XMemPreallocateFreeSpace

# XMemPreallocateFreeSpace

ヒステリシス値までのヒープの空きページを割り当てます。

## Syntax

```cpp theme={null}
BOOL XMemPreallocateFreeSpace(  
         DWORD MemType,  
         BOOL LargeHeap  
)  
```

### Parameters

*MemType*   \_In\_\
型: DWORD

ヒープを記述する **XALLOC\_MEMTYPE\_GRAPHICS** 定数。詳細については、[XALLOC\_ATTRIBUTES](https://docs.xbox.com/ja-jp/reference/system/xmem/structs/xalloc_attributes.md) を参照してください。

*LargeHeap*   \_In\_\
型: BOOL

ヒープが「大」であるかどうかを示します。true に設定すると、ヒープは「大」と見なされます。それ以外の場合、ヒープは「小」と見なされます。「大」ヒープは、4 KB から 128 KB、またはアライメントが 4 KB 以上と指定された割り当てを満たすために使用されます。一方、「小」ヒープは、4 KB より小さく、アライメントが 4 KB 未満と指定された割り当てを満たすために使用されます。

### Return value

型: BOOL

すべてのページを割り当てることができた場合は `TRUE` を返します。それ以外の場合は `FALSE`。

## Remarks

この関数は、*MemType* に記述されたヒープに対して、そのヒープのヒステリシス量まで空きスペースを割り当てます。ヒープのヒステリシス量を取得するには [XMemGetAllocationHysteresis](https://docs.xbox.com/ja-jp/reference/system/xmem/functions/xmemgetallocationhysteresis.md) を使用し、ヒープのヒステリシス量を指定するには [XMemSetAllocationHysteresis](https://docs.xbox.com/ja-jp/reference/system/xmem/functions/xmemsetallocationhysteresis.md) を使用します。詳細については、[Memory](https://docs.xbox.com/ja-jp/build/console-features/memory/system-memory-overview.md) を参照してください。

## Requirements

**ヘッダー:** xmem.h

**ライブラリ:** xmem.lib

**サポートされているプラットフォーム:** XBOX One ファミリー本体および XBOX Series 本体

## See also

[XALLOC\_ATTRIBUTES](https://docs.xbox.com/ja-jp/reference/system/xmem/structs/xalloc_attributes.md)\
[XMem](https://docs.xbox.com/ja-jp/reference/system/xmem/xmem_members.md)


## Related topics

- [XPersistentLocalStorageSpaceInfo](https://docs.xbox.com/ja-jp/reference/system/xpersistentlocalstorage/structs/xpersistentlocalstoragespaceinfo.md)
- [XMemFreeDefault](https://docs.xbox.com/ja-jp/reference/system/xmem/functions/xmemfreedefault.md)
- [XMemFreePhysicalPages](https://docs.xbox.com/ja-jp/reference/system/xmem/functions/xmemfreephysicalpages.md)
- [PIXRecordMemoryFreeEvent](https://docs.xbox.com/ja-jp/reference/tools/pix3/functions/pixrecordmemoryfreeevent.md)
- [game_chat_free_memory_callback](https://docs.xbox.com/ja-jp/reference/chat/gamechat2/functions/game_chat_free_memory_callback.md)
