> ## 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.

# XMemGetAllocationHysteresis

> XMemGetAllocationHysteresis 會傳回 XBOX GDK 遊戲堆積的遲滯量，並無條件進位至下一個內部配置邊界。

# XMemGetAllocationHysteresis

取得指定堆積的遲滯量，並無條件進位至內部配置邊界。

<a id="syntaxSection" />

## 語法

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

<a id="parametersSection" />

### 參數

*MemType*   \_In\_<br />類型：DWORD

描述堆積的 **XALLOC\_MEMTYPE\_GRAPHICS** 常數。如需詳細資訊，請參閱 [XALLOC\_ATTRIBUTES](/zh-TW/reference/system/xmem/structs/xalloc_attributes)。

*LargeHeap*   \_In\_<br />類型：BOOL

表示堆積是否為「大型」。如果設定為 true，則堆積會被視為「大型」；否則堆積會被視為「小型」。「大型」堆積用於滿足 4 KB 到 128 KB 的配置，或對齊指定為 4 KB 或更高的配置；「小型」堆積用於滿足小於 4 KB 且對齊指定為小於 4 KB 的配置。

<a id="retvalSection" />

### 傳回值

類型：SIZE\_T

遲滯量，以位元組為單位。堆積實作可能會將指定的遲滯量無條件進位至內部配置邊界。

<a id="remarksSection" />

## 備註

此函式會取得指定堆積的「遲滯量」，也就是堆積在將額外的可用記憶體歸還給作業系統之前，會保留的最小可用記憶體量。此函式傳回的遲滯量會無條件進位至內部配置邊界。目前，內部配置邊界設定為 2 MB。

若要設定指定堆積的遲滯量，請使用 [XMemSetAllocationHysteresis](/zh-TW/reference/system/xmem/functions/xmemsetallocationhysteresis)。

<a id="requirementsSection" />

## 需求

**標頭：** xmem.h

**程式庫：** xmem.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[XALLOC\_ATTRIBUTES](/zh-TW/reference/system/xmem/structs/xalloc_attributes)<br />[XMem](/zh-TW/reference/system/xmem/xmem_members)


## Related topics

- [XMemPreallocateFreeSpace](/reference/system/xmem/functions/xmempreallocatefreespace.md)
- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [PFMemGetFunctions](/services/playfab/api-references/c/pfplatform/functions/pfmemgetfunctions.md)
- [HCMemGetFunctions](/reference/live/httpclient/httpclient/functions/hcmemgetfunctions.md)
- [XMEM_ALLOCATION_HOOKS](/reference/system/xmem/structs/xmem_allocation_hooks.md)
