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

# PIXRecordMemoryFreeEvent

> PIXRecordMemoryFreeEvent

# PIXRecordMemoryFreeEvent

메모리 해제 이벤트를 기록합니다.

## Syntax

```cpp theme={null}
void PIXRecordMemoryFreeEvent(  
         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 열에 표시됩니다. 예를 들어, 이 추가 데이터를 사용하여 특정 메모리 위치에서 해제된 타이틀 내 개체의 유형을 식별할 수 있습니다. `PIXRecordMemoryFreeEvent`에 전달되는 값이 이에 대응하는 [PIXRecordMemoryAllocationEvent](/reference/tools/pix3/functions/pixrecordmemoryallocationevent) 호출에 전달된 값과 일치할 필요는 없습니다.

### Return value

Type: void

## Remarks

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

PIX는 \_baseAddress\_와 *size* 매개 변수를 사용하여 이에 대응하는 할당을 다음과 같이 찾습니다. \_baseAddress\_가 이에 대응하는 [PIXRecordMemoryAllocationEvent](/reference/tools/pix3/functions/pixrecordmemoryallocationevent) 호출에 전달된 \_baseAddress\_와 일치하면 PIX는 단순히 주소를 비교하여 할당과 해제를 매칭합니다. 이 경우 *size* 매개 변수에 0을 전달할 수 있습니다. \_baseAddress\_가 이에 대응하는 할당에서 지정한 값과 다른 경우 *size* 매개 변수는 0이 아닌 값으로 지정해야 합니다. 이 경우 PIX는 \_baseAddress\_와 *size* 둘 다 사용하여 이에 대응하는 할당을 찾습니다.

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

## 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 custom memory allocators (NDA topic)](/tools/tools-console/pix/pix-custom-memory-allocators) [PIX API reference](/reference/tools/pix3/pix3_members)<br />[PIXRecordMemoryAllocationEvent](/reference/tools/pix3/functions/pixrecordmemoryallocationevent)<br />[PIX (NDA topic)](/tools/tools-console/pix/pix)


## Related topics

- [PIXRecordMemoryAllocationEvent](/ko/reference/tools/pix3/functions/pixrecordmemoryallocationevent.md)
- [PIX3](/ko/reference/tools/pix3/pix3_members.md)
- [game_chat_free_memory_callback](/ko/reference/chat/gamechat2/functions/game_chat_free_memory_callback.md)
- [PartyFreeMemoryCallback](/ko/services/playfab/multiplayer/networking/reference/callbacks/partyfreememorycallback.md)
- [PFMultiplayerFreeMemoryCallback](/ko/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pfmultiplayer/callbacks/pfmultiplayerfreememorycallback.md)
