Frage

Was libc-Implementierung in Android-Plattform verwendet? Was ist malloc-Implementierung (ptmalloc oder tcmalloc oder etwas anderes) verwendet?

War es hilfreich?

Lösung

libc Bionic und malloc heißt Doug Lea Version a href dem Namen <=" http://en.wikipedia.org/wiki/C_dynamic_memory_allocation# dlmalloc“rel = "nofollow noreferrer"> dlmalloc (mit use_locks für Thread-Sicherheit aktiviert ist).

Update: dlmalloc wurde im Januar 2016 entfernt: https://github.com/android/ platform_bionic / commit / c650447239352d43acc2fd99a8579a85ae0469ab https://sourceforge.net/ p / android-x86 / bionische / ci / 0ac0cee0d1ab60a92103a5021e76ec31da2e3234 / "Merge "Remove dlmalloc.""

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

So, Android 7 verwendet externe malloc Implementierung jemalloc (von FreeBSD / Facebook) - http://jemalloc.net/ und https://github.com/jemalloc/jemalloc ; Android-Variante des Codes ist es: https://android.googlesource.com/platform/external/ jemalloc /

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top