开发者

Android libc version and malloc implementation

开发者 https://www.devze.com 2022-12-20 00:58 出处:网络
What libc implementat开发者_如何学编程ion is used in Android platform? What malloc implementation is used (ptmalloc or tcmalloc or anything other)? libc is Bionic and malloc isDoug Lea version named d

What libc implementat开发者_如何学编程ion is used in Android platform? What malloc implementation is used (ptmalloc or tcmalloc or anything other)?


libc is Bionic and malloc is Doug Lea version named dlmalloc (with USE_LOCKS enabled for thread-safety).

Update: dlmalloc was removed in january 2016: https://github.com/android/platform_bionic/commit/c650447239352d43acc2fd99a8579a85ae0469ab https://sourceforge.net/p/android-x86/bionic/ci/0ac0cee0d1ab60a92103a5021e76ec31da2e3234/ "Merge "Remove dlmalloc.""

+libc_malloc_src := bionic/jemalloc_wrapper.cpp
+libc_common_c_includes += external/jemalloc/include

So, Android 7 uses external malloc implementation jemalloc (from FreeBSD/Facebook) - http://jemalloc.net/ and https://github.com/jemalloc/jemalloc; android variant of code is there: https://android.googlesource.com/platform/external/jemalloc/

0

精彩评论

暂无评论...
验证码 换一张
取 消