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/malloc_hook_mmap_linux.h | |
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/malloc_hook_mmap_linux.h')
-rwxr-xr-x[-rw-r--r--] | src/malloc_hook_mmap_linux.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h index 3c6cab4..54e5d87 100644..100755 --- a/src/malloc_hook_mmap_linux.h +++ b/src/malloc_hook_mmap_linux.h @@ -202,6 +202,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, return result; } +#ifndef __UCLIBC__ // libc's version: extern "C" void* __sbrk(ptrdiff_t increment); @@ -212,6 +213,8 @@ extern "C" void* sbrk(ptrdiff_t increment) __THROW { return result; } +#endif + /*static*/void* MallocHook::UnhookedMMap(void *start, size_t length, int prot, int flags, int fd, off_t offset) { void* result; |