diff options
author | kib <kib@FreeBSD.org> | 2010-08-17 09:05:39 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-08-17 09:05:39 +0000 |
commit | 3c2c3f33ee230b5a0169bd5dd2d57e42fdb22d05 (patch) | |
tree | 2a4b7d1ddfeee3c1c0711a89f2cac3b60b2c3d0f /lib/libc/stdlib/malloc.c | |
parent | d9f088a03e65b9a9a1109213406f79fc4a1b33ae (diff) | |
download | FreeBSD-src-3c2c3f33ee230b5a0169bd5dd2d57e42fdb22d05.zip FreeBSD-src-3c2c3f33ee230b5a0169bd5dd2d57e42fdb22d05.tar.gz |
Use the newly provided aux vectors to get pagesize and osreldate information.
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
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
0 files changed, 0 insertions, 0 deletions