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

# XMemPreallocateFreeSpace

> XMemPreallocateFreeSpace

# XMemPreallocateFreeSpace

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

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*MemType*   \_In\_\
型: DWORD

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

*LargeHeap*   \_In\_\
型: BOOL

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

<a id="retvalSection" />

### Return value

型: BOOL

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

<a id="remarksSection" />

## Remarks

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

<a id="requirementsSection" />

## Requirements

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

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

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

<a id="seealsoSection" />

## See also

[XALLOC\_ATTRIBUTES](/reference/system/xmem/structs/xalloc_attributes)\
[XMem](/reference/system/xmem/xmem_members)


## Related topics

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