*** Welcome to piglix ***

Bionic (software)

Bionic
Developer(s) Open Handset Alliance
Initial release September 23, 2008; 8 years ago (2008-09-23)
Operating system Android
Platform x86, x86-64, ARM, ARM64, MIPS, MIPS64
Type C standard library
License Three-clause BSD licence
Website developer.android.com

Bionic is the standard C library (including libc, libdl, libm, and libpthread) developed by Google for its Android operating system.

The original publicly stated goals for Bionic were the following:

Bionic only supports Linux kernels, but currently supports the aarch64, arm, mips, mips64, x86, and x86-64 architectures.

Some parts of the libc source, such as stdio, are from the BSDs (mainly OpenBSD), whereas others, such as the pthread implementation, were written from scratch.

The dynamic memory allocator is usually jemalloc, though it used to be dlmalloc, and still is on some memory-constrained devices; jemalloc gives much higher performance than dlmalloc, but at the cost of extra memory required for bookkeeping. Some 64-bit devices, like the Nexus 9, are effectively low-memory devices and use dlmalloc because of the extra space requirements of 64-bit pointers and hosting of two zygotes. (Zygote is an Android system service that is the parent of all Android application processes.)

The libm source is largely FreeBSD's, but with optimized assembler contributed by the various SoC vendors.

The dynamic linker (and libdl) were written from scratch.

Bionic doesn't include libthread_db (used by gdbserver), but there is one in the NDK; Android uses a statically-linked gdbserver so developers can use the latest gdb even on old devices.

There is no separate libpthread, libresolv, or librt on Android – the functionality is all in libc. For libpthread, there's no attempt to optimize for the single-threaded case because apps are in a multi-threaded environment even before the first instruction of third-party code is ever run.

The Android platform now uses libc++ for the C++ standard library (releases up to and including Lollipop used stlport). The NDK currently offers stlport, libc++, and the GNU STL.

Although bionic aims to implement all of POSIX, there are still (as of Lollipop) almost 200 functions missing (though the long double complex math functions make up a large chunk of that). There are also POSIX functions such as the endpwent/getpwent/setpwent family that are inapplicable to Android because it lacks a passwd database.


...
Wikipedia

...