Add a command for showing the heap usage.
PR: 165025 Submitted by: Gavin Mu MFC after: 1 week
This commit is contained in:
parent
46684c91ec
commit
e2a35695f8
@ -800,6 +800,18 @@ main(int (*openfirm)(void *))
|
||||
return (1);
|
||||
}
|
||||
|
||||
COMMAND_SET(heap, "heap", "show heap usage", command_heap);
|
||||
|
||||
static int
|
||||
command_heap(int argc, char *argv[])
|
||||
{
|
||||
|
||||
mallocstats();
|
||||
printf("heap base at %p, top at %p, upper limit at %p\n", heapva,
|
||||
sbrk(0), heapva + HEAPSZ);
|
||||
return(CMD_OK);
|
||||
}
|
||||
|
||||
COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user