Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
MallocTimer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4#include "CoreTypes.h"
5#include "HAL/CriticalSection.h"
6#include "HAL/PlatformTime.h"
7
8#ifndef UE_TIME_VIRTUALMALLOC
9#define UE_TIME_VIRTUALMALLOC 0
10#endif
11
13{
15 {
21
22 Max
23 };
24
26 {
27 OrdinaryCPU, // General memory
28 GPU_WriteCombine, // XALLOC_MEMTYPE_GRAPHICS_COMMAND_BUFFER_WRITECOMBINE and XALLOC_MEMTYPE_GRAPHICS_WRITECOMBINE
29 GPU_Cacheable, // XALLOC_MEMTYPE_GRAPHICS_CACHEABLE
30 GPU_WriteCombineRenderTarget, // Similar to GPU_WriteCombine, but with 4MB pages and up to 128K alignment, no small block allocator
32 };
33
37
41
43 : Index(InIndex)
46 {
48 }
50 {
53 }
54
55 static void UpdateStats();
56#else //UE_TIME_VIRTUALMALLOC
57 FORCEINLINE FScopedVirtualMallocTimer(int32 InIndex = 0, int32 InPlatformTypeIndex = 0)
58 {
59 }
61 {
62 }
64 {
65 }
66#endif //UE_TIME_VIRTUALMALLOC
67};
#define UE_TIME_VIRTUALMALLOC
Definition MallocTimer.h:9
#define FORCEINLINE
Definition Platform.h:644
static FORCEINLINE void UpdateStats()
Definition MallocTimer.h:63
FORCEINLINE FScopedVirtualMallocTimer(int32 InIndex=0, int32 InPlatformTypeIndex=0)
Definition MallocTimer.h:57
FORCEINLINE ~FScopedVirtualMallocTimer()
Definition MallocTimer.h:60