summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 19:01:25 +0100
committerMichael Brown2017-03-22 19:01:25 +0100
commitc90b4d82b7f98e8c470ed3199e6f59c0082c095a (patch)
treedbc4e45d85e6c9d12fdd3eaf42be7ef357d1b82d /src/include
parent[coverity] Add Coverity user model (diff)
downloadipxe-c90b4d82b7f98e8c470ed3199e6f59c0082c095a.tar.gz
ipxe-c90b4d82b7f98e8c470ed3199e6f59c0082c095a.tar.xz
ipxe-c90b4d82b7f98e8c470ed3199e6f59c0082c095a.zip
[malloc] Track maximum heap usage
Track the current and maximum heap usage, and display the maximum during shutdown when DEBUG=malloc is enabled. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/malloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/malloc.h b/src/include/ipxe/malloc.h
index dd158b8e..1878978f 100644
--- a/src/include/ipxe/malloc.h
+++ b/src/include/ipxe/malloc.h
@@ -22,6 +22,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <valgrind/memcheck.h>
extern size_t freemem;
+extern size_t usedmem;
+extern size_t maxusedmem;
extern void * __malloc alloc_memblock ( size_t size, size_t align,
size_t offset );