glibc
The GNU Project's implementation of the C standard library and the most commonly used C library on Linux systems. It provides ISO C and POSIX interfaces, and its qsort implementation uses merge sort to guarantee stability.
Timeline (last 90 days)
Alpine Linux uses musl libc and BusyBox in place of the common glibc and GNU core utilities, and its base image is only a few MB in size.
glibc's qsort uses merge sort to guarantee stability, while other implementations may use quicksort, and qsort not only does not guarantee stability but also does not specify the algorithm.
glibc's default allocator ptmalloc is prone to memory fragmentation and lock contention issues in high-concurrency, large-scale memory operation scenarios.
The low-level toolchain includes binutils (assembler and linker), GCC, glibc (the C standard library), and Linux kernel headers.
GNU Guix, through the Reduced Binary Seed project, incrementally builds an assembler and C compiler from a minimal seed, ultimately producing a complete GCC and glibc, forming a fully auditable chain of trust.
The Bionic C library used by Android differs significantly from the standard glibc; Bionic does not support certain POSIX interfaces and uses a different dynamic linker path.
Due to its heavy use of dlopen and the NSS plugin mechanism, glibc is difficult to fully statically link, and even when -static is specified, it may still attempt to load shared libraries at runtime.
Three main libc implementations exist in the Linux ecosystem: glibc, musl, and Bionic (used by Android).
musl's default thread stack size is only 128KB, far smaller than glibc's 8MB.
The ptmalloc2 used by glibc derives from Doug Lea's dlmalloc and employs an arena mechanism to maintain independent memory pools per thread in order to reduce multi-threaded lock contention.
4 more timeline events
All Facts (15)
常见的运行时内存分配器包括glibc的ptmalloc、jemalloc和tcmalloc
95%UnverifiedAlpine Linux uses musl libc and BusyBox in place of the common glibc and GNU core utilities, and its base image is only a few MB in size.
50%Unverifiedglibc's qsort uses merge sort to guarantee stability, while other implementations may use quicksort, and qsort not only does not guarantee stability but also does not specify the algorithm.
50%Unverifiedglibc's default allocator ptmalloc is prone to memory fragmentation and lock contention issues in high-concurrency, large-scale memory operation scenarios.
50%UnverifiedThe low-level toolchain includes binutils (assembler and linker), GCC, glibc (the C standard library), and Linux kernel headers.
50%UnverifiedGNU Guix, through the Reduced Binary Seed project, incrementally builds an assembler and C compiler from a minimal seed, ultimately producing a complete GCC and glibc, forming a fully auditable chain of trust.
50%UnverifiedThe Bionic C library used by Android differs significantly from the standard glibc; Bionic does not support certain POSIX interfaces and uses a different dynamic linker path.
50%UnverifiedDue to its heavy use of dlopen and the NSS plugin mechanism, glibc is difficult to fully statically link, and even when -static is specified, it may still attempt to load shared libraries at runtime.
50%UnverifiedThree main libc implementations exist in the Linux ecosystem: glibc, musl, and Bionic (used by Android).
50%Unverifiedmusl's default thread stack size is only 128KB, far smaller than glibc's 8MB.
50%UnverifiedThe ptmalloc2 used by glibc derives from Doug Lea's dlmalloc and employs an arena mechanism to maintain independent memory pools per thread in order to reduce multi-threaded lock contention.
50%UnverifiedAfter migrating from glibc-based images to Alpine (musl), applications may experience performance degradation ranging from 10% to several times.
50%Unverifiedmusl's DNS resolver does not support NSS, does not support mDNS, and in early versions sent A and AAAA queries serially rather than in parallel as glibc does.
50%Unverifiedglibc's DNS resolution is implemented through the NSS (Name Service Switch) framework, which supports configuring multiple name resolution backends via /etc/nsswitch.conf.
50%UnverifiedAlpine Linux选择musl libc作为默认C库,musl静态链接后的二进制文件通常比glibc版本小5-10倍
50%