diff options
author | csilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2011-11-16 05:21:54 +0000 |
---|---|---|
committer | csilvers <csilvers@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2011-11-16 05:21:54 +0000 |
commit | 6c3eaabd7306173b6b71b63797ebf050675046cf (patch) | |
tree | fe3e0d9e1bc20543580c61f52659db97fc497ccb /src/malloc_hook_mmap_freebsd.h | |
parent | a6076edd177d59e67207753b799ce047a3663cb0 (diff) | |
download | gperftools-6c3eaabd7306173b6b71b63797ebf050675046cf.tar.gz |
* Check for mingw compilers that *do* define timespec
* Replace atexit() calls with global dtors; helps freebsd (csilvers)
* Fix malloc_hook_mmap_linux for ARM (dougkwan)
* Disalbe heap-checker under AddressSanitizer (kcc)
* Fix bug in powerpc stacktracing (ppluzhnikov)
* Use exponential backoff waiting for spinlocks (m3b)
* Fix 64-bit nm on 32-bit binaries in pprof (csilvers)
* Implement stacktrace for ARM (dougkwan)
* Add ProfileHandlerDisallowForever (rsc)
* Shell escape when forking in pprof (csilvers)
* Fix freebsd to work on x86_64 (chapp...@gmail.com)
* No longer combine overloaded functions in pprof (csilvers)
* Fix address-normalizing bug in pprof (csilvers)
* More consistently call abort() instead of exit() on failure (csilvers)
* Allow NoGlobalLeaks to be safely called more than once (csilvers)
* Beef up the documentation a bit about using libunwind (csilvers)
git-svn-id: http://gperftools.googlecode.com/svn/trunk@121 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
Diffstat (limited to 'src/malloc_hook_mmap_freebsd.h')
-rw-r--r-- | src/malloc_hook_mmap_freebsd.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/malloc_hook_mmap_freebsd.h b/src/malloc_hook_mmap_freebsd.h index 4ac2bb3..6e31f06 100644 --- a/src/malloc_hook_mmap_freebsd.h +++ b/src/malloc_hook_mmap_freebsd.h @@ -62,11 +62,19 @@ extern "C" { static inline void* do_sbrk(intptr_t increment) { void* curbrk; - __asm__ __volatile__( - "movl .curbrk, %%eax;" - "movl %%eax, %0" - : "=r" (curbrk) - :: "%eax"); +#if defined(__x86_64__) || defined(__amd64__) + __asm__ __volatile__( + "movq .curbrk, %%rax;" + "movq %%rax, %0" + : "=r" (curbrk) + :: "%rax"); +#else + __asm__ __volatile__( + "movl .curbrk, %%eax;" + "movl %%eax, %0" + : "=r" (curbrk) + :: "%eax"); +#endif char* prevbrk = static_cast<char*>(curbrk); void* newbrk = prevbrk + increment; |