Skip to content

Commit

Permalink
Merge pull request #11111 from bassamtabbara/wip-tcmalloc-minimal
Browse files Browse the repository at this point in the history
cmake: Support tcmalloc_minimal allocator

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Sep 19, 2016
2 parents 354fbf5 + 43e9c26 commit 229c60a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -225,6 +225,10 @@ if(ALLOCATOR STREQUAL "tcmalloc")
set(ALLOC_LIBS ${GPERFTOOLS_TCMALLOC_LIBRARY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
set(TCMALLOC_srcs perfglue/heap_profiler.cc)
elseif(ALLOCATOR STREQUAL "tcmalloc_minimal")
set(ALLOC_LIBS ${GPERFTOOLS_TCMALLOC_MINIMAL_LIBRARY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
set(TCMALLOC_srcs perfglue/disabled_heap_profiler.cc)
elseif(ALLOCATOR STREQUAL "jemalloc")
set(ALLOC_LIBS jemalloc)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free")
Expand Down

0 comments on commit 229c60a

Please sign in to comment.