summaryrefslogtreecommitdiff
path: root/src/heap-checker.cc
diff options
context:
space:
mode:
authorxiaoyur347 <xiaoyur347@gmail.com>2013-12-20 09:02:49 +0800
committerxiaoyur347 <xiaoyur347@gmail.com>2013-12-20 09:02:49 +0800
commit7c4888515ed93347d4793fc066cd6048e519a197 (patch)
treeb68c4f582981dce27434682be427124aa398dd82 /src/heap-checker.cc
parent7bd193bca97d93b43ff6c824bc9f39227329312f (diff)
downloadgperftools-7c4888515ed93347d4793fc066cd6048e519a197.tar.gz
add uclibc support
* some variables defined with "char *" should be modified to "const char*" * For uclibc, glibc's "void malloc_stats(void)" should be "void malloc_stats(FILE *)", is commented now. * For uclibc, __sbrk is with attribute "hidden", so we use mmap allocator for uclibc.
Diffstat (limited to 'src/heap-checker.cc')
-rwxr-xr-x[-rw-r--r--]src/heap-checker.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/heap-checker.cc b/src/heap-checker.cc
index 1f8acf2..5a6a3de 100644..100755
--- a/src/heap-checker.cc
+++ b/src/heap-checker.cc
@@ -1652,8 +1652,13 @@ ssize_t HeapLeakChecker::ObjectsLeaked() const {
// Save pid of main thread for using in naming dump files
static int32 main_thread_pid = getpid();
#ifdef HAVE_PROGRAM_INVOCATION_NAME
+#ifdef __UCLIBC__
+extern const char* program_invocation_name;
+extern const char* program_invocation_short_name;
+#else
extern char* program_invocation_name;
extern char* program_invocation_short_name;
+#endif
static const char* invocation_name() { return program_invocation_short_name; }
static string invocation_path() { return program_invocation_name; }
#else