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

# PIXRecordMemoryAllocationEvent

> PIXRecordMemoryAllocationEvent

# PIXRecordMemoryAllocationEvent

메모리 할당 이벤트를 기록합니다.

## Syntax

```cpp theme={null}
void PIXRecordMemoryAllocationEvent(  
         USHORT allocatorId,  
         void* baseAddress,  
         size_t size,  
         UINT64 metadata  
)  
```

### Parameters

*allocatorId*   <br />Type: USHORT

메모리 프로파일러에서 메모리 할당 그룹을 식별하는 데 사용할 수 있는 ID입니다. 예를 들어 그래픽, 오디오, 물리 등에 대해 서로 다른 힙이 있는 경우 이러한 각 범주에 서로 다른 **allocatorID**를 할당하여 PIX에서 메모리 캡처를 볼 때 쉽게 식별할 수 있습니다.

*baseAddress*   <br />Type: void\*

할당된 메모리의 시작 주소입니다.

*size*   <br />Type: size\_t

할당된 메모리의 크기(바이트)입니다.

*metadata*   <br />Type: UINT64

할당에 추가 데이터를 태그하는 데 사용할 수 있는 64비트 부호 없는 정수입니다. 이 추가 데이터는 PIX에서 **UserData** 열에 표시됩니다. 예를 들어, 이 추가 데이터를 사용하여 특정 메모리 위치에 저장된 타이틀 내 개체의 유형을 식별할 수 있습니다.

### Return value

Type: void

## Remarks

PIX 메모리 추적 이벤트는 메모리 프로파일링 캡처에서 타이틀의 사용자 지정 메모리 할당자 내에서 이루어진 모든 메모리 할당 및 해제에 대한 정보를 표시하기 위해 PIX에 필요한 데이터를 제공합니다. 이 데이터를 제공하면 PIX는 **VirtualAlloc**/**VirtualFree** 및 **HeapAlloc**/**HeapFree** 호출에 대해 표시하는 것과 동일한 모든 데이터를 사용자 지정 할당자에 대해서도 표시합니다.

동시에 발생하는 이벤트가 많거나 시스템에 큰 부하가 걸릴 경우 Event Tracing for Windows(ETW)에 의해 메모리 이벤트가 손실될 수 있습니다. 이벤트 손실은 불완전한 데이터 분석을 초래합니다. PIX Memory Capture UI에는 이벤트 손실을 나타내는 경고가 표시됩니다.

여러 [PIXRecordMemoryFreeEvent](/reference/tools/pix3/functions/pixrecordmemoryfreeevent) 호출을 사용하여 단일 할당에서 점진적으로 해제되는 메모리를 추적할 수 있습니다.

사용자 지정 할당 및 해제 데이터가 메모리 캡처에 어떻게 표시되는지에 대한 자세한 내용은 [PIX custom memory allocators (NDA topic)](/tools/tools-console/pix/pix-custom-memory-allocators)를 참조하세요.

## Requirements

**Header:** pixmemory.h

**Library:** pixevt.lib

**Supported platforms:** XBOX One 계열 콘솔 및 XBOX Series 콘솔

## Conceptual documentation

* [ATG Systems Engagement Checklist](/build/atg-engagement/atg-systems-engagement)

## See also

[PIX (NDA topic)](/tools/tools-console/pix/pix)

[PIX custom memory allocators (NDA topic)](/tools/tools-console/pix/pix-custom-memory-allocators)

[PIX API reference](/reference/tools/pix3/pix3_members)

[PIXRecordMemoryFreeEvent](/reference/tools/pix3/functions/pixrecordmemoryfreeevent)


## Related topics

- [PIXRecordMemoryFreeEvent](/ko/reference/tools/pix3/functions/pixrecordmemoryfreeevent.md)
- [PIX3](/ko/reference/tools/pix3/pix3_members.md)
- [DSTORAGE_ERROR_RECORD](/ko/reference/system/dstorage/structs/dstorage_error_record.md)
- [XMEM_ALLOCATION_HOOKS](/ko/reference/system/xmem/structs/xmem_allocation_hooks.md)
- [IDStorageQueueX::RetrieveErrorRecord](/ko/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_retrieveerrorrecord.md)
