<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/malloc, branch v0.7.9</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>namespace fixes for sys/mman.h</title>
<updated>2011-04-20T19:55:58+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-20T19:55:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b052f13cd1215cf444f16ccf14c96e32f61f73e0'/>
<id>b052f13cd1215cf444f16ccf14c96e32f61f73e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix rare but nasty under-allocation bug in malloc with large requests</title>
<updated>2011-04-04T21:26:41+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-04T21:26:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b761bd19aa1ae0f95dd2146397b7f39b44a471b6'/>
<id>b761bd19aa1ae0f95dd2146397b7f39b44a471b6</id>
<content type='text'>
the bug appeared only with requests roughly 2*sizeof(size_t) to
4*sizeof(size_t) bytes smaller than a multiple of the page size, and
only for requests large enough to be serviced by mmap instead of the
normal heap. it was only ever observed on 64-bit machines but
presumably could also affect 32-bit (albeit with a smaller window of
opportunity).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the bug appeared only with requests roughly 2*sizeof(size_t) to
4*sizeof(size_t) bytes smaller than a multiple of the page size, and
only for requests large enough to be serviced by mmap instead of the
normal heap. it was only ever observed on 64-bit machines but
presumably could also affect 32-bit (albeit with a smaller window of
opportunity).
</pre>
</div>
</content>
</entry>
<entry>
<title>avoid over-allocation of brk on first malloc</title>
<updated>2011-04-02T03:07:03+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-04-02T03:07:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=bf8785825ac57371c268f54866923d6f89231639'/>
<id>bf8785825ac57371c268f54866923d6f89231639</id>
<content type='text'>
if init_malloc returns positive (successful first init), malloc will
retry getting a chunk from the free bins rather than expanding the
heap again. also pass init_malloc a hint for the size of the initial
allocation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if init_malloc returns positive (successful first init), malloc will
retry getting a chunk from the free bins rather than expanding the
heap again. also pass init_malloc a hint for the size of the initial
allocation.
</pre>
</div>
</content>
</entry>
<entry>
<title>rename __simple_malloc.c to lite_malloc.c - yes this affects behavior!</title>
<updated>2011-03-30T13:29:49+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-03-30T13:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=620a1346382f9e10b516bc168f86d499b6716769'/>
<id>620a1346382f9e10b516bc168f86d499b6716769</id>
<content type='text'>
why does this affect behavior? well, the linker seems to traverse
archive files starting from its current position when resolving
symbols. since calloc.c comes alphabetically (and thus in sequence in
the archive file) between __simple_malloc.c and malloc.c, attempts to
resolve the "malloc" symbol for use by calloc.c were pulling in the
full malloc.c implementation rather than the __simple_malloc.c
implementation.

as of now, lite_malloc.c and malloc.c are adjacent in the archive and
in the correct order, so malloc.c should never be used to resolve
"malloc" unless it's already needed to resolve another symbol ("free"
or "realloc").
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
why does this affect behavior? well, the linker seems to traverse
archive files starting from its current position when resolving
symbols. since calloc.c comes alphabetically (and thus in sequence in
the archive file) between __simple_malloc.c and malloc.c, attempts to
resolve the "malloc" symbol for use by calloc.c were pulling in the
full malloc.c implementation rather than the __simple_malloc.c
implementation.

as of now, lite_malloc.c and malloc.c are adjacent in the archive and
in the correct order, so malloc.c should never be used to resolve
"malloc" unless it's already needed to resolve another symbol ("free"
or "realloc").
</pre>
</div>
</content>
</entry>
<entry>
<title>very cheap double-free checks in malloc</title>
<updated>2011-03-23T17:24:00+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-03-23T17:24:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=095820016689dfdc9141f477a86de22054c86078'/>
<id>095820016689dfdc9141f477a86de22054c86078</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>global cleanup to use the new syscall interface</title>
<updated>2011-03-20T04:16:43+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-03-20T04:16:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=aa398f56fa398f2202b04e82c67f822f3233786f'/>
<id>aa398f56fa398f2202b04e82c67f822f3233786f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>make malloc(0) return unique pointers rather than NULL</title>
<updated>2011-02-20T21:16:33+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-02-20T21:16:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=26031da0f83a2a3ed52190077931ee6c18dfd689'/>
<id>26031da0f83a2a3ed52190077931ee6c18dfd689</id>
<content type='text'>
this change is made with some reluctance, but i think it's for the
best. correct programs must handle either behavior, so there is little
advantage to having malloc(0) return NULL. and i managed to actually
make the malloc code slightly smaller with this change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this change is made with some reluctance, but i think it's for the
best. correct programs must handle either behavior, so there is little
advantage to having malloc(0) return NULL. and i managed to actually
make the malloc code slightly smaller with this change.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix simple_malloc malloc(0) behavior not to return non-unique pointers</title>
<updated>2011-02-20T21:12:09+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-02-20T21:12:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=598a0147cde14d093d17b81c102a1757b5ef9975'/>
<id>598a0147cde14d093d17b81c102a1757b5ef9975</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix simple_malloc size restrictions</title>
<updated>2011-02-20T21:10:38+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-02-20T21:10:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a23baf586a1ca78213d43bce5fee2a30715b473b'/>
<id>a23baf586a1ca78213d43bce5fee2a30715b473b</id>
<content type='text'>
do not allow allocations that overflow ptrdiff_t; fix some overflow
checks that were not quite right but didn't matter due to address
layout implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
do not allow allocations that overflow ptrdiff_t; fix some overflow
checks that were not quite right but didn't matter due to address
layout implementation.
</pre>
</div>
</content>
</entry>
<entry>
<title>initial check-in, version 0.5.0</title>
<updated>2011-02-12T05:22:29+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-02-12T05:22:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01'/>
<id>0b44a0315b47dd8eced9f3b7f31580cf14bbfc01</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
