Skip to content
LeviMC
English
AutoLightDark
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#ifdef LL_PLAT_S
24 virtual ::Memory::MemoryCategory exchangeCurrentCategory(::Memory::MemoryCategory);
25#else // LL_PLAT_C
26 virtual ::Memory::MemoryCategory exchangeCurrentCategory(::Memory::MemoryCategory newCategory);
27#endif
28
29 virtual ::Memory::MemoryCategory getCurrentCategory() const;
30
31#ifdef LL_PLAT_S
32 virtual void setManuallyTrackedCategoryBytes(::Memory::MemoryCategory, uint64);
33#else // LL_PLAT_C
34 virtual void setManuallyTrackedCategoryBytes(::Memory::MemoryCategory category, uint64 bytes);
35#endif
36
37 virtual uint64 getCategoryAllocationCount(uint) const;
38
39#ifdef LL_PLAT_S
40 virtual uint64 getCategoryAllocatedMemory(uint) const;
41#else // LL_PLAT_C
42 virtual uint64 getCategoryAllocatedMemory(uint cat) const;
43#endif
44
45 virtual uint64 getCategoryTotalAllocationCount(uint) const;
46
47 virtual void publish();
48
49#ifdef LL_PLAT_S
50 virtual void populateCounters(::std::vector<::Memory::MemoryCategoryCounter>&, uint64) const;
51#else // LL_PLAT_C
52 virtual void populateCounters(
53 ::std::vector<::Memory::MemoryCategoryCounter>& categoryCounters,
54 uint64 minimumThresholdBytes
55 ) const;
56#endif
57
58 // NOLINTEND
59
60public:
61 // virtual function thunks
62 // NOLINTBEGIN
63 MCNAPI bool $isTracking() const;
64
65#ifdef LL_PLAT_S
66 MCNAPI ::Memory::MemoryCategory $exchangeCurrentCategory(::Memory::MemoryCategory);
67#else // LL_PLAT_C
68 MCNAPI ::Memory::MemoryCategory $exchangeCurrentCategory(::Memory::MemoryCategory newCategory);
69#endif
70
71 MCNAPI ::Memory::MemoryCategory $getCurrentCategory() const;
72
73#ifdef LL_PLAT_S
74 MCNAPI void $setManuallyTrackedCategoryBytes(::Memory::MemoryCategory, uint64);
75#else // LL_PLAT_C
76 MCNAPI void $setManuallyTrackedCategoryBytes(::Memory::MemoryCategory category, uint64 bytes);
77#endif
78
79 MCNAPI uint64 $getCategoryAllocationCount(uint) const;
80
81#ifdef LL_PLAT_S
82 MCNAPI uint64 $getCategoryAllocatedMemory(uint) const;
83#else // LL_PLAT_C
84 MCNAPI uint64 $getCategoryAllocatedMemory(uint cat) const;
85#endif
86
87 MCNAPI uint64 $getCategoryTotalAllocationCount(uint) const;
88
89 MCNAPI void $publish();
90
91#ifdef LL_PLAT_S
92 MCNAPI void $populateCounters(::std::vector<::Memory::MemoryCategoryCounter>&, uint64) const;
93#else // LL_PLAT_C
94 MCNAPI void $populateCounters(
95 ::std::vector<::Memory::MemoryCategoryCounter>& categoryCounters,
96 uint64 minimumThresholdBytes
97 ) const;
98#endif
99
100
101 // NOLINTEND
102};
103
104} // namespace Memory
Definition MemoryTracker.h:15
MCAPI void $publish()
MCAPI void $setManuallyTrackedCategoryBytes(::Memory::MemoryCategory category, uint64 bytes)
MCAPI uint64 $getCategoryTotalAllocationCount(uint) const
MCAPI uint64 $getCategoryAllocatedMemory(uint cat) const
MCAPI bool $isTracking() const
MCAPI void $populateCounters(::std::vector<::Memory::MemoryCategoryCounter > &categoryCounters, uint64 minimumThresholdBytes) const
MCAPI uint64 $getCategoryAllocationCount(uint) const
MCAPI::Memory::MemoryCategory $exchangeCurrentCategory(::Memory::MemoryCategory newCategory)
MCAPI::Memory::MemoryCategory $getCurrentCategory() const
Definition MemoryCategoryCounter.h:10