diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c index be0819f3525..8eba04ab86c 100644 --- a/sys/boot/sparc64/loader/main.c +++ b/sys/boot/sparc64/loader/main.c @@ -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