Makes slightly easier to use jemalloc and tcmalloc.
The two are quite common choices for profiling and debugging.
---
configure | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/configure b/configure
index c3c4f82..2421771 100755
--- a/configure
+++ b/configure
@@ -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
@@ -1680,6 +1681,7 @@ CMDLINE_SET="
cc
cpu
cross_prefix
+ custom_allocator
dep_cc
env
extra_version
@@ -4218,6 +4220,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
--
2.5.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel