musl - an implementation of the standard library for Linux-based systems
Go to file
Rich Felker c673158d91 fix overly pessimistic realloc strategy in getdelim
previously, getdelim was allocating twice the space needed every time
it expanded its buffer to implement exponential buffer growth (in
order to avoid quadratic run time). however, this doubling was
performed even when the final buffer length needed was already known,
which is the common case that occurs whenever the delimiter is in the
FILE's buffer.

this patch makes two changes to remedy the situation:

1. over-allocation is no longer performed if the delimiter has already
been found when realloc is needed.

2. growth factor is reduced from 2x to 1.5x to reduce the relative
excess allocation in cases where the delimiter is not initially in the
buffer, including unbuffered streams.

in theory these changes could lead to quadratic time if the same
buffer is reused to process a sequence of lines successively
increasing in length, but once this length exceeds the stdio buffer
size, the delimiter will not be found in the buffer right away and
exponential growth will still kick in.
2015-12-20 00:39:35 -05:00
arch remove visibility suppression by SHARED macro in mips and x32 arch files 2015-12-15 23:18:38 -05:00
crt explicitly assemble all arm asm sources as UAL 2015-11-10 00:01:55 -05:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include fix mismatched parens in CMPLX def for annex-g-conforming compilers 2015-11-02 21:44:57 -05:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src fix overly pessimistic realloc strategy in getdelim 2015-12-20 00:39:35 -05:00
tools add CFI generation script for x86_64 2015-10-13 18:09:46 -04:00
.gitignore add musl-clang, a wrapper for system clang installs 2015-07-06 23:52:16 +00:00
COPYRIGHT update authors/contributors list 2015-03-16 18:43:54 -04:00
INSTALL update notice on broken gcc versions in INSTALL file 2014-07-31 19:02:54 -04:00
Makefile fix build regression from removal of #ifdef SHARED 2015-11-18 19:00:44 -05:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.12 2015-10-19 19:12:57 -04:00
WHATSNEW release 1.1.12 2015-10-19 19:12:57 -04:00
configure work around toolchains with broken visibility in libgcc/libpcc 2015-11-07 20:23:49 -05:00

README

    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/