<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/stdlib/malloc.c, branch release/5.2.1</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F5.2.1</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F5.2.1'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2003-12-07T04:12:46Z</updated>
<entry>
<title>Remove malloc debugging for the release.</title>
<updated>2003-12-07T04:12:46Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2003-12-07T04:12:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=86536f3f9aefdca590555930e67547d9f4e9a252'/>
<id>urn:sha1:86536f3f9aefdca590555930e67547d9f4e9a252</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not adjust to the pagesize at runtime. Besides for the one-time</title>
<updated>2003-11-28T18:03:22Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2003-11-28T18:03:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fd7707aa509adeece052f27eee59225590e63931'/>
<id>urn:sha1:fd7707aa509adeece052f27eee59225590e63931</id>
<content type='text'>
initialization overhead, there's a problem in that we never call
imalloc() and thus malloc_init() for zero-sized allocations. As a
result, malloc(0) returns NULL when it's the first or only malloc in
the program. Any non-zero allocation will initialize the malloc code
with the side-effect that subsequent zero-sized allocations return a
non-NULL pointer. This is because the pointer we return for zero-
sized allocations is calculated from malloc_pageshift, which needs
to be initialized at runtime on ia64.

The result of the inconsistent behaviour described above is that
configure scripts failed the test for a GNU compatible malloc. This
resulted in a lot of broken ports.

Other, even simpler, solutions were possible as well:
1.  initialize malloc_pageshift with some non-zero value (say 13 for
    8KB pages) and keep the runtime adjustment.
2.  Stop using malloc_pageshift to calculate ZEROSIZEPTR.

Removal of the runtime adjustment was chosen because then ia64 is the
same as any other platform. It is not to say that using a page size
obtained at runtime is bad per se. It's that there's currently a high
level of gratuity for its existence and the moment it causes problems
is the moment you need to get rid of it. Hence, it's not unthinkable
that this commit is (partially) reverted some time in the future when
we do have a good reason for it and a good way to achieve it.

Approved by: re@ (rwatson)
Reported by: kris (portmgr@) -- may the ports be with you
</content>
</entry>
<entry>
<title>Externalize malloc's spinlock so that a thread library can take</title>
<updated>2003-11-04T19:49:56Z</updated>
<author>
<name>Daniel Eischen</name>
<email>deischen@FreeBSD.org</email>
</author>
<published>2003-11-04T19:49:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=358702366c7f1153b632164a0ebbbc2e54609c72'/>
<id>urn:sha1:358702366c7f1153b632164a0ebbbc2e54609c72</id>
<content type='text'>
it around an application's fork() call.  Our new thread libraries
(libthr, libpthread) can now have threads running while another
thread calls fork().  In this case, it is possible for malloc
to be left in an inconsistent state in the child.  Our thread
libraries, libpthread in particular, need to use malloc internally
after a fork (in the child).

Reviewed by:	davidxu
</content>
</entry>
<entry>
<title>Remove incomplete support for running FreeBSD userland on old NetBSD kernels</title>
<updated>2003-10-29T10:45:01Z</updated>
<author>
<name>Tim J. Robbins</name>
<email>tjr@FreeBSD.org</email>
</author>
<published>2003-10-29T10:45:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4539e95a0f9a1b9806306fd0a5997a58208f5c9f'/>
<id>urn:sha1:4539e95a0f9a1b9806306fd0a5997a58208f5c9f</id>
<content type='text'>
lacking the issetugid() and utrace() syscalls.
</content>
</entry>
<entry>
<title>Consistently cast to (u_char *) when filling with junk.</title>
<updated>2003-10-25T23:47:33Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-10-25T23:47:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ba5455f25c4f9983c1010711cd2c9cc1f49b0340'/>
<id>urn:sha1:ba5455f25c4f9983c1010711cd2c9cc1f49b0340</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Style changes.  Inching closer to convergence with OpenBSD.</title>
<updated>2003-10-25T12:56:51Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-10-25T12:56:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ea0ae15a06c1d6486180d3b25101a09170bec114'/>
<id>urn:sha1:ea0ae15a06c1d6486180d3b25101a09170bec114</id>
<content type='text'>
</content>
</entry>
<entry>
<title>More style fixes to improve diffability with OpenBSD.</title>
<updated>2003-09-27T18:58:26Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-09-27T18:58:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9aa1994ce80820e3cf850d48ee3602fb58a582a1'/>
<id>urn:sha1:9aa1994ce80820e3cf850d48ee3602fb58a582a1</id>
<content type='text'>
Pull 'A' evilness for realloc(3) from OpenBSD.
</content>
</entry>
<entry>
<title>Style changes to improve diffability against OpenBSD version.</title>
<updated>2003-09-27T17:29:03Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-09-27T17:29:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dcd276697960417ce290ff1a280e1214cd2cad76'/>
<id>urn:sha1:dcd276697960417ce290ff1a280e1214cd2cad76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Minor constification.</title>
<updated>2003-07-29T11:16:14Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-07-29T11:16:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df6989b84837a85a00decd1ca2bb39e6011b0935'/>
<id>urn:sha1:df6989b84837a85a00decd1ca2bb39e6011b0935</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clarify the code a bit.</title>
<updated>2003-06-01T09:16:50Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2003-06-01T09:16:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b600adca794116ace9ac4dcd6e97c84e6b92b7bb'/>
<id>urn:sha1:b600adca794116ace9ac4dcd6e97c84e6b92b7bb</id>
<content type='text'>
Submitted by:	Nadav Eiron &lt;nadav@TheEirons.org&gt;
</content>
</entry>
</feed>
