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

# MapSimple (XBOX One 系列)

> 使用 ESRAM 頁面後接系統記憶體頁面的簡單排列方式來對應頁面。

# XGMemoryLayout::MapSimple 方法 (XBOX One 系列)

使用 ESRAM 頁面後接系統記憶體頁面的簡單排列方式來對應頁面。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT MapSimple(
         XGMemoryLayoutMapping *pMapping,
         UINT32 PageCount,
         UINT32 EsramPageCount
)  
```

<a id="ID4EG" />

### 參數

*pMapping*   \_Inout\_\
類型: XGMemoryLayoutMapping \*

\[in, out] 更新後的對應結果，以指向 [XGMemoryLayoutMapping](/zh-TW/reference/graphics/xgmemory_NR/structs/xgmemorylayoutmapping) 結構的指標表示。

*PageCount*   \
類型: UINT32

頁面總數，包括系統頁面和 ESRAM 頁面。

如果 *PageCount* 為 XG\_ALL\_REMAINING\_PAGES，則會以 [XGMemoryLayout::GetPageCountRemaining](/zh-TW/reference/graphics/xgmemory_NR/interfaces/XGMemoryLayout/methods/xgmemorylayout_getpagecountremaining) 取代作為 *PageCount*。

*EsramPageCount*\
類型: UINT32

ESRAM 頁面數目。

如果 *EsramPageCount* 為 XG\_ALL\_REMAINING\_PAGES，則會以 [XGMemoryLayout::GetFreeEsramPageCount](/zh-TW/reference/graphics/xgmemory_NR/interfaces/XGMemoryLayout/methods/xgmemorylayout_getfreeesrampagecount) 取代作為 *EsramPageCount*。

<a id="ID4EP" />

### 傳回值

類型: HRESULT

S\_OK、E\_INVALIDARG 或 E\_OUTOFMEMORY。

<a id="remarks" />

## 備註

此方法使用簡單的排列方式來對應頁面：先是 *EsramPageCount* 個 ESRAM 頁面，接著是 (*PageCount* - *EsramPageCount*) 個系統記憶體頁面。

<a id="requirements" />

## 需求

**標頭:** xgmemory.h

<a id="ID4E1C" />

**支援的平台:** XBOX One 系列

## 另請參閱

[XGMemoryLayout](/zh-TW/reference/graphics/xgmemory_NR/interfaces/XGMemoryLayout/xgmemorylayout)


## Related topics

- [Map](/zh-CN/reference/graphics/d3d12/interfaces/id3d12resource/methods/id3d12resource_map_public.md)
- [CopyDescriptorsSimple](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_copydescriptorssimple_public.md)
- [XMemMapPhysicalPages](/zh-CN/reference/system/xmem/functions/xmemmapphysicalpages.md)
- [ApuMapApuAddress](/zh-CN/reference/audio/apu/functions/apumapapuaddress.md)
- [ApuMapVirtualAddress](/zh-CN/reference/audio/apu/functions/apumapvirtualaddress.md)
