mirror of
https://github.com/gperftools/gperftools
synced 2024-12-19 14:00:02 +00:00
force inline do_mmap_with_hooks
Otherwise mmap calling to do_mmap_with_hooks might tail-call (instead of inlining), which will then break GetCallerStackTrace facility (since only mmap is placed into special malloc_hook section). This unbreaks heap checker on gcc 5, but is in general right thing to do.
This commit is contained in:
parent
9a123db7b4
commit
d48bf6b3ad
@ -223,7 +223,8 @@ static void* do_mmap(void* start, size_t length, int prot, int flags, int fd, in
|
||||
|
||||
#ifdef DEFINED_DO_MMAP
|
||||
|
||||
static void* do_mmap_with_hooks(void* start, size_t length, int prot, int flags, int fd, int64_t offset) {
|
||||
static inline ATTRIBUTE_ALWAYS_INLINE
|
||||
void* do_mmap_with_hooks(void* start, size_t length, int prot, int flags, int fd, int64_t offset) {
|
||||
void* result = do_mmap(start, length, prot, flags, fd, offset);
|
||||
if (result == MAP_FAILED) {
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user