diff options
author | xiaoyur347 <xiaoyur347@gmail.com> | 2013-12-20 09:02:49 +0800 |
---|---|---|
committer | xiaoyur347 <xiaoyur347@gmail.com> | 2013-12-20 09:02:49 +0800 |
commit | 7c4888515ed93347d4793fc066cd6048e519a197 (patch) | |
tree | b68c4f582981dce27434682be427124aa398dd82 /src/heap-checker.cc | |
parent | 7bd193bca97d93b43ff6c824bc9f39227329312f (diff) | |
download | gperftools-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.cc | 5 |
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 |