summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Judd <ben@judd.blue>2021-04-18 16:28:11 -0700
committerBen Judd <ben@judd.blue>2021-04-18 16:28:11 -0700
commitb09eb5e01092876edfd7c8190f30a121c48eccbc (patch)
treec7544c6156c07b3077b584d3b2f1ccbe067f9274 /src
parentdb3203fe59b32eb956fcb004a8ef863fad199899 (diff)
Comments
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 db2dc168..8448569d 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1445,8 +1445,10 @@ 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
}
else if (parser[0] == "shared-strings")