diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-09-03 11:55:48 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-09-30 21:42:26 +0200 |
commit | 8ae1d87a2440cea0564efe2a6c9c223478a05f44 (patch) | |
tree | e44418f9fabc00d99e35274fce71b1e2bb9298a8 /configure | |
parent | 9a3202a98b2e095b54dd784c3e01a09a676fc3fa (diff) | |
download | ffmpeg-streaming-8ae1d87a2440cea0564efe2a6c9c223478a05f44.zip ffmpeg-streaming-8ae1d87a2440cea0564efe2a6c9c223478a05f44.tar.gz |
build: Add support for known custom allocators
Makes slightly easier to use jemalloc and tcmalloc.
The two are quite common choices for profiling and debugging.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -268,6 +268,7 @@ Toolchain options: Advanced options (experts only): --malloc-prefix=PREFIX prefix malloc and related names with PREFIX + --custom-allocator=NAME use a supported custom allocator --disable-symver disable symbol versioning --enable-hardcoded-tables use hardcoded tables instead of runtime generation --disable-safe-bitstream-reader @@ -1691,6 +1692,7 @@ CMDLINE_SET=" cc cpu cross_prefix + custom_allocator dep_cc env extra_version @@ -4245,6 +4247,17 @@ check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()" check_builtin MemoryBarrier windows.h "MemoryBarrier()" check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)" +case "$custom_allocator" in + jemalloc) + # jemalloc by default does not use a prefix + require libjemalloc jemalloc/jemalloc.h malloc -ljemalloc + ;; + tcmalloc) + require_pkg_config libtcmalloc gperftools/tcmalloc.h tc_malloc + malloc_prefix=tc_ + ;; +esac + check_func_headers malloc.h _aligned_malloc && enable aligned_malloc check_func ${malloc_prefix}memalign && enable memalign check_func ${malloc_prefix}posix_memalign && enable posix_memalign |