summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-04-19 20:56:55 +1000
committerMaxime Coste <mawww@kakoune.org>2021-04-19 20:56:55 +1000
commitf7be47fb956691cd4a41d3829ef4c59aad45fe67 (patch)
treeb7a856e359f843aa8b971f972b901f10ed8a1e12 /src
parent7c127f5b3cd9a2d4306c8dbce70ce7fdd5c5d447 (diff)
parentb09eb5e01092876edfd7c8190f30a121c48eccbc (diff)
Merge remote-tracking branch 'Icantjuddle/fix_deprexated_mallinfo_call'
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index dd95f0fc..652399bb 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1448,7 +1448,9 @@ const CommandDesc debug_cmd = {
}
write_to_debug_buffer({});
write_to_debug_buffer(format(" Total: {}", total));
- #if defined(__GLIBC__) || defined(__CYGWIN__)
+ #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 33))
+ write_to_debug_buffer(format(" Malloced: {}", mallinfo2().uordblks));
+ #else if defined(__GLIBC__) || defined(__CYGWIN__)
write_to_debug_buffer(format(" Malloced: {}", mallinfo().uordblks));
#endif
}