Command to print total kernel heap usage for debugging.

This commit is contained in:
Geoffrey Challen
2016-02-11 16:56:51 -05:00
parent 27b85a44ab
commit db6d3d219d
3 changed files with 57 additions and 15 deletions

View File

@@ -376,6 +376,18 @@ cmd_kheapstats(int nargs, char **args)
return 0;
}
static
int
cmd_kheapused(int nargs, char **args)
{
(void)nargs;
(void)args;
kheap_printused();
return 0;
}
static
int
cmd_kheapgeneration(int nargs, char **args)
@@ -541,6 +553,7 @@ static const char *mainmenu[] = {
"[?o] Operations menu ",
"[?t] Tests menu ",
"[kh] Kernel heap stats ",
"[khu] Kernel heap usage ",
"[khgen] Next kernel heap generation ",
"[khdump] Dump kernel heap ",
"[q] Quit and shut down ",
@@ -593,6 +606,7 @@ static struct {
/* stats */
{ "kh", cmd_kheapstats },
{ "khu", cmd_kheapused },
{ "khgen", cmd_kheapgeneration },
{ "khdump", cmd_kheapdump },