palladium/include/pd/base/Memory.hpp
tobid7 224daffaf7 Changes:
- Start Restructuring Project
- Add Makefile for Testbuilds
- Optimize Lithium as much as possible
- Remove Render2 to get wasted time
- Optimize UI7 for LRS
2024-08-30 14:54:49 +02:00

27 lines
761 B
C++

#pragma once
#include <cstddef>
namespace Palladium {
namespace Memory {
/// @brief Metriks struct For the Internal Tracker
struct memory_metrics {
unsigned int t_TotalAllocated = 0; ///< Total Allocated Memory
unsigned int t_TotalFreed = 0; ///< Total Deleted Memory
/// @brief Gets the Currently Allocated Memory
unsigned int t_CurrentlyAllocated() {
return t_TotalAllocated - t_TotalFreed;
}
};
/// @brief Get Total Allocated Memory
/// @return Total Allocated Memory
size_t GetTotalAllocated();
/// @brief Get Total Deleted Memory
/// @return Total Deleted Memory
size_t GetTotalFreed();
/// @brief Get Current Allocated Memory
/// @return Current Allocated Memory
size_t GetCurrent();
} // namespace Memory
} // namespace Palladium