LeviLamina
Loading...
Searching...
No Matches
MemoryTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/memory/MemoryCategory.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Memory { struct MemoryCategoryCounter; }
11// clang-format on
12
13namespace Memory {
14
16public:
17 // virtual functions
18 // NOLINTBEGIN
19 virtual ~MemoryTracker() = default;
20
21 virtual bool isTracking() const;
22
23 virtual ::Memory::MemoryCategory getCurrentCategory() const;
24
25#ifdef LL_PLAT_S
26 virtual void setCurrentCategory(::Memory::MemoryCategory);
27#else // LL_PLAT_C
28 virtual void setCurrentCategory(::Memory::MemoryCategory category);
29#endif
30
31 virtual uint64 getCategoryAllocationCount(uint) const;
32
33#ifdef LL_PLAT_S
34 virtual uint64 getCategoryAllocatedMemory(uint) const;
35#else // LL_PLAT_C
36 virtual uint64 getCategoryAllocatedMemory(uint cat) const;
37#endif
38
39 virtual uint64 getCategoryTotalAllocationCount(uint) const;
40
41 virtual void publish();
42
43#ifdef LL_PLAT_S
44 virtual void populateCounters(::std::vector<::Memory::MemoryCategoryCounter>&, uint64) const;
45#else // LL_PLAT_C
46 virtual void populateCounters(
47 ::std::vector<::Memory::MemoryCategoryCounter>& categoryCounters,
48 uint64 minimumThresholdBytes
49 ) const;
50#endif
51
52 // NOLINTEND
53
54public:
55 // virtual function thunks
56 // NOLINTBEGIN
57 MCFOLD bool $isTracking() const;
58
59 MCFOLD ::Memory::MemoryCategory $getCurrentCategory() const;
60
61#ifdef LL_PLAT_S
62 MCFOLD void $setCurrentCategory(::Memory::MemoryCategory);
63#else // LL_PLAT_C
64 MCFOLD void $setCurrentCategory(::Memory::MemoryCategory category);
65#endif
66
67 MCFOLD uint64 $getCategoryAllocationCount(uint) const;
68
69#ifdef LL_PLAT_S
70 MCFOLD uint64 $getCategoryAllocatedMemory(uint) const;
71#else // LL_PLAT_C
72 MCFOLD uint64 $getCategoryAllocatedMemory(uint cat) const;
73#endif
74
75 MCFOLD uint64 $getCategoryTotalAllocationCount(uint) const;
76
77 MCFOLD void $publish();
78
79#ifdef LL_PLAT_S
80 MCFOLD void $populateCounters(::std::vector<::Memory::MemoryCategoryCounter>&, uint64) const;
81#else // LL_PLAT_C
82 MCFOLD void $populateCounters(
83 ::std::vector<::Memory::MemoryCategoryCounter>& categoryCounters,
84 uint64 minimumThresholdBytes
85 ) const;
86#endif
87
88
89 // NOLINTEND
90};
91
92} // namespace Memory
Definition MemoryTracker.h:15
Definition MemoryCategoryCounter.h:10