從自訂配置器回報記憶體配置與釋放
PIXRecordMemoryAllocationEvent 與 PIXRecordMemoryFreeEvent API 提供 PIX 在時間擷取中顯示遊戲自訂記憶體配置器內所有記憶體配置資訊所需的資料。提供此資料後,PIX 會為您的自訂配置器顯示與 XMemVirtualAlloc/VirtualFree 以及 HeapAlloc/HeapFree 呼叫相同的所有資料。 若要呼叫 PIXRecordMemoryAllocationEvent 與 PIXRecordMemoryFreeEvent 並在 PIX 中檢視產生的資料,請在原始程式碼中包含 pixmemory.h,並確保已定義 USE_PIX。請依下列範例所示呼叫 PIXRecordMemoryAllocationEvent 與 PIXRecordMemoryFreeEvent。在 PIX 中檢視配置與釋放事件
若要查看與您呼叫 PIXRecordMemoryAllocationEvent 與 PIXRecordMemoryFreeEvent 相對應的記憶體事件,請在開始時間擷取之前選取 Custom Allocator events 核取方塊,如下圖所示。
