mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
1 changed files with 12 additions and 0 deletions
|
|
@ -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 a new issue