summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alkondratenko@gmail.com>2016-12-18 09:35:02 -0800
committerAliaksey Kandratsenka <alkondratenko@gmail.com>2016-12-18 12:53:47 -0800
commitb8f9d0d44f94177d34b069180618b7d002e85b69 (patch)
tree990152041645cdef488a7132e1b83d13c5354859 /Makefile.am
parentb0abefd93834d9d9c7ffaae2d23bd48ed8e96477 (diff)
downloadgperftools-b8f9d0d44f94177d34b069180618b7d002e85b69.tar.gz
ported nallocx support from Google-internal tcmalloc
nallocx is extension introduced by jemalloc. It returns effective size of allocaiton without allocating anything. We also support MALLOCX_LG_ALIGN flag. But all other jemalloc flags (which at the moment do nothing for nallocx anyways) are silently ignored, since there is no sensible way to return errors in this API. This was originally contributed by Dmitry Vyukov with input from Andrew Hunter. But due to significant divergence of Google-internal and free-software forks of tcmalloc, significant massaging was done by me. So all bugs are mine.
Diffstat (limited to 'Makefile.am')
-rwxr-xr-xMakefile.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index ccbf009..4a281f4 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -101,7 +101,7 @@ endif MINGW
if HAVE_OBJCOPY_WEAKEN
WEAKEN = $(OBJCOPY) -W malloc -W free -W realloc -W calloc -W cfree \
-W memalign -W posix_memalign -W valloc -W pvalloc \
- -W malloc_stats -W mallopt -W mallinfo \
+ -W malloc_stats -W mallopt -W mallinfo -W nallocx \
-W _Znwm -W _ZnwmRKSt9nothrow_t -W _Znam -W _ZnamRKSt9nothrow_t \
-W _ZdlPv -W _ZdaPv \
-W __Znwm -W __ZnwmRKSt9nothrow_t -W __Znam -W __ZnamRKSt9nothrow_t \
@@ -457,7 +457,8 @@ S_TCMALLOC_MINIMAL_INCLUDES = src/common.h \
SG_TCMALLOC_MINIMAL_INCLUDES = src/gperftools/malloc_hook.h \
src/gperftools/malloc_hook_c.h \
src/gperftools/malloc_extension.h \
- src/gperftools/malloc_extension_c.h
+ src/gperftools/malloc_extension_c.h \
+ src/gperftools/nallocx.h
TCMALLOC_MINIMAL_INCLUDES = $(S_TCMALLOC_MINIMAL_INCLUDES) $(SG_TCMALLOC_MINIMAL_INCLUDES) $(SG_STACKTRACE_INCLUDES)
perftoolsinclude_HEADERS += $(SG_TCMALLOC_MINIMAL_INCLUDES)