summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 5fc53657..9e88d76d 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -29,7 +29,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+
+#if defined(__GLIBC__)
#include <malloc.h>
+#endif
namespace Kakoune
{
@@ -835,7 +838,9 @@ const CommandDesc debug_cmd = {
write_debug(domain_name((MemoryDomain)domain) + (": " + to_string(count)));
}
write_debug("Total: " + to_string(total));
+ #if defined(__GLIBC__)
write_debug("Malloced: " + to_string(mallinfo().uordblks));
+ #endif
}
else
throw runtime_error("unknown debug command '" + parser[0] + "'");