17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 16:52:31 +01:00

perf(debug): count what the program takes with new (global operator new/delete of the executable) and the objects of the model instances in the memory section of the debug panel

This commit is contained in:
2026-10-23 22:26:01 +02:00
parent 2dc70a50bc
commit 4be94dd006
3 changed files with 149 additions and 1 deletions

View File

@@ -23,6 +23,16 @@ struct process_memory
process_memory query_process_memory();
// what the program took with new and hasn't given back with delete (the global operators of the executable count it): bytes of
// the blocks, as the c runtime made them, and blocks. what libraries, the c runtime and the drivers take otherwise isn't in it
struct heap_memory
{
std::uint64_t bytes{0};
std::uint64_t blocks{0};
};
heap_memory query_heap_memory();
// what a part of the program keeps in memory: things and bytes
struct memory_count
{