17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 15:30:21 +01:00

perf(debug): live heap blocks by size and the objects of the simulation tables in the memory section of the debug panel

This commit is contained in:
2026-10-23 22:45:49 +02:00
parent 4be94dd006
commit 16ee4ff65b
3 changed files with 65 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ http://mozilla.org/MPL/2.0/.
#pragma once
#include <array>
#include <cstdint>
#include <vector>
@@ -29,6 +30,10 @@ struct heap_memory
{
std::uint64_t bytes{0};
std::uint64_t blocks{0};
// the same by the size of the blocks: class N holds the blocks of 2^(N-1) to 2^N - 1 bytes
static constexpr std::size_t CLASSES{48};
std::array<std::uint64_t, CLASSES> classbytes{};
std::array<std::uint64_t, CLASSES> classblocks{};
};
heap_memory query_heap_memory();