mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
bdk: heap: add nodes info
This commit is contained in:
parent
889317da58
commit
2c768db542
2 changed files with 6 additions and 0 deletions
|
@ -172,7 +172,10 @@ void heap_monitor(heap_monitor_t *mon, bool print_node_stats)
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (node->used)
|
if (node->used)
|
||||||
|
{
|
||||||
|
mon->nodes_used++;
|
||||||
mon->used += node->size + sizeof(hnode_t);
|
mon->used += node->size + sizeof(hnode_t);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
mon->total += node->size + sizeof(hnode_t);
|
mon->total += node->size + sizeof(hnode_t);
|
||||||
|
|
||||||
|
@ -188,4 +191,5 @@ void heap_monitor(heap_monitor_t *mon, bool print_node_stats)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mon->total += mon->used;
|
mon->total += mon->used;
|
||||||
|
mon->nodes_total = count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,8 @@ typedef struct
|
||||||
{
|
{
|
||||||
u32 total;
|
u32 total;
|
||||||
u32 used;
|
u32 used;
|
||||||
|
u32 nodes_total;
|
||||||
|
u32 nodes_used;
|
||||||
} heap_monitor_t;
|
} heap_monitor_t;
|
||||||
|
|
||||||
void heap_init(void *base);
|
void heap_init(void *base);
|
||||||
|
|
Loading…
Reference in a new issue