diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-01-12 19:55:58 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-01-12 19:55:58 +0000 |
| commit | c8d651a51774ab70614cbf20b2e996e4f3d4bb9f (patch) | |
| tree | e28f9f2eadadf285602a055f6af2ba07f2421a9b /src | |
| parent | e8b80705363e736940b2487f7158b4a5d21ddd55 (diff) | |
Protect use of mallinfo in #ifdef __GLIBC__ blocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 5 |
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] + "'"); |
