<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rtld-elf/malloc.c, branch release/9.0.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F9.0.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F9.0.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2011-08-24T20:05:13Z</updated>
<entry>
<title>Rtld links with the specially built pic static libc library to get some</title>
<updated>2011-08-24T20:05:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-08-24T20:05:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0e9a2605200b721fdfcf32d2c95f79a81fc84352'/>
<id>urn:sha1:0e9a2605200b721fdfcf32d2c95f79a81fc84352</id>
<content type='text'>
C runtime services, like printf(). Unfortunately, the multithread-safeness
measures in the libc do not work in rtld environment.

Rip the kernel printf() implementation and use it in the rtld instead of
libc version. This printf does not require any shared global data and thus
is mt-safe. Systematically use rtld_printf() and related functions, remove
the calls to err(3).

Note that stdio is still pulled from libc due to libmap implementaion using
fopen(). This is safe but unoptimal, and can be changed later.

Reported and tested by:	pgj
Diagnosed and reviewed by:	kan (previous version)
Approved by:	re (bz)
</content>
</entry>
<entry>
<title>Use the newly provided aux vectors to get pagesize and osreldate information.</title>
<updated>2010-08-17T09:05:39Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2010-08-17T09:05:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d59a6353d7e825b2f97f4eea68956725635c4383'/>
<id>urn:sha1:d59a6353d7e825b2f97f4eea68956725635c4383</id>
<content type='text'>
Use local version of getpagesize(), rtld_getpagesize() in private allocator.
Override the __getosreldate() previously fetched from libc_pic.a with
local version that uses aux value if present. Note that __getosreldate()
is used by rtld indirectly, by mmap(2) libc wrapper.

To be able to utilize aux, split digest_dynamic() for use by init_rtld()
into two parts, where the first one does not call malloc(), and the
second part uses it. init_rtld() is able to initialize global variables
before digest_dynamic2() calls. In particular, pagesize and osreldate are
set up from the aux values.

Now, rtld avoids (two) sysctl calls in startup.

Tested by:	marius (sparc64)
MFC after:	1 month
</content>
</entry>
<entry>
<title>In preparation for a new malloc implementation:</title>
<updated>2006-01-12T07:28:21Z</updated>
<author>
<name>Jason Evans</name>
<email>jasone@FreeBSD.org</email>
</author>
<published>2006-01-12T07:28:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=52828c0e9cfdf1681a8c16cf313294ad1413ac25'/>
<id>urn:sha1:52828c0e9cfdf1681a8c16cf313294ad1413ac25</id>
<content type='text'>
  * Add posix_memalign().

  * Move calloc() from calloc.c to malloc.c.  Add a calloc() implementation in
    rtld-elf in order to make the loader happy (even though calloc() isn't
    used in rtld-elf).

  * Add _malloc_prefork() and _malloc_postfork(), and use them instead of
    directly manipulating __malloc_lock.

Approved by:	phk, markm (mentor)
</content>
</entry>
<entry>
<title>Very minor style nit: sort include files alphabetically.</title>
<updated>2003-08-22T02:22:59Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2003-08-22T02:22:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=566ef09073e1467debf7c0b776a2dce66da00324'/>
<id>urn:sha1:566ef09073e1467debf7c0b776a2dce66da00324</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix signed/unsigned comparison warnings.</title>
<updated>2003-05-04T00:56:00Z</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2003-05-04T00:56:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=78af18bd240456a39d887f53917920abe63237d6'/>
<id>urn:sha1:78af18bd240456a39d887f53917920abe63237d6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add missing include files I forgot about in previous commit.</title>
<updated>2003-02-13T17:35:00Z</updated>
<author>
<name>Alexander Kabaev</name>
<email>kan@FreeBSD.org</email>
</author>
<published>2003-02-13T17:35:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=92b0ec083202bad8b737ec44069c52da0bfddbaa'/>
<id>urn:sha1:92b0ec083202bad8b737ec44069c52da0bfddbaa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove /usr/lib/elf from a default search path.</title>
<updated>2003-02-13T17:05:10Z</updated>
<author>
<name>Alexander Kabaev</name>
<email>kan@FreeBSD.org</email>
</author>
<published>2003-02-13T17:05:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d38a104b7589e2ef02b2d1392305352a009ed12f'/>
<id>urn:sha1:d38a104b7589e2ef02b2d1392305352a009ed12f</id>
<content type='text'>
Move xprintf to malloc.c, it is only used there. Make static.

Submitted by:	phantom
</content>
</entry>
<entry>
<title>Include stddef.h for NULL definition, rather than rolling our own here.</title>
<updated>2002-08-21T19:03:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2002-08-21T19:03:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7b5564b2ee16671807427760130f320ce24186d0'/>
<id>urn:sha1:7b5564b2ee16671807427760130f320ce24186d0</id>
<content type='text'>
Reviewed by: jdp
</content>
</entry>
<entry>
<title>Change brk's prototype from char *brk(const char *) to int brk(const void *)</title>
<updated>2002-01-24T12:11:31Z</updated>
<author>
<name>David Malone</name>
<email>dwmalone@FreeBSD.org</email>
</author>
<published>2002-01-24T12:11:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98d1592458f5ead3e8cd52ca7d8185977d7fdef8'/>
<id>urn:sha1:98d1592458f5ead3e8cd52ca7d8185977d7fdef8</id>
<content type='text'>
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).

This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.

Also remove local declarations of sbrk and unnecessary casting.

PR:		32296
Tested by:	Harti Brandt &lt;brandt@fokus.gmd.de&gt;
MFC after:	1 month
</content>
</entry>
<entry>
<title>Add `_PATH_DEVZERO'.</title>
<updated>2000-12-09T09:35:55Z</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2000-12-09T09:35:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1a37aa566b347fbb2d2196786e1e84a79ffea9d5'/>
<id>urn:sha1:1a37aa566b347fbb2d2196786e1e84a79ffea9d5</id>
<content type='text'>
Use _PATH_* where where possible.
</content>
</entry>
</feed>
