musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker 503bd39766 import mallocng
the files added come from the mallocng development repo, commit
2ed58817cca5bc055974e5a0e43c280d106e696b. they comprise a new malloc
implementation, developed over the past 9 months, to replace the old
allocator (since dubbed "oldmalloc") with one that retains low code
size and minimal baseline memory overhead while avoiding fundamental
flaws in oldmalloc and making significant enhancements. these include
highly controlled fragmentation, fine-grained ability to return memory
to the system when freed, and strong hardening against dynamic memory
usage errors by the caller.

internally, mallocng derives most of these properties from tightly
structuring memory, creating space for allocations as uniform-sized
slots within individually mmapped (and individually freeable)
allocation groups. smaller-than-pagesize groups are created within
slots of larger ones. minimal group size is very small, and larger
sizes (in geometric progression) only come into play when usage is
high.

all data necessary for maintaining consistency of the allocator state
is tracked in out-of-band metadata, reachable via a validated path
from minimal in-band metadata. all pointers passed (to free, etc.) are
validated before any stores to memory take place. early reuse of freed
slots is avoided via approximate LRU order of freed slots. further
hardening against use-after-free and double-free, even in the case
where the freed slot has been reused, is made by cycling the offset
within the slot at which the allocation is placed; this is possible
whenever the slot size is larger than the requested allocation.
2020-06-30 00:59:48 -04:00
arch fix incorrect SIGSTKFLT on all mips archs 2020-05-21 16:25:12 -04:00
compat/time32 fix null pointer dereference in setitimer time32 compat shim 2019-12-08 10:35:04 -05:00
crt remove unnecessary and problematic _Noreturn from crt/ldso startup 2019-06-25 19:05:40 -04:00
dist
include remove duplicate definitions of INET[6]_ADDRSTRLEN 2020-03-04 12:33:35 -05:00
ldso have ldso track replacement of aligned_alloc 2020-06-10 22:02:45 -04:00
src import mallocng 2020-06-30 00:59:48 -04:00
tools fix incorrect escaping in add-cfi.*.awk scripts 2020-01-20 15:57:29 -05:00
.gitignore
.mailmap update contributor name 2019-12-07 12:21:35 -05:00
configure suppress unwanted warnings when configuring with clang 2020-06-01 20:59:53 -04:00
COPYRIGHT add optimized aarch64 memcpy and memset 2020-06-26 17:49:51 -04:00
dynamic.list
INSTALL document mips r6 in INSTALL file 2019-09-27 00:22:48 -04:00
Makefile move oldmalloc to its own directory under src/malloc 2020-06-03 19:23:02 -04:00
README
VERSION release 1.2.0 2020-02-20 19:37:02 -05:00
WHATSNEW release 1.2.0 2020-02-20 19:37:02 -05:00

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/