Increase rtld initial memory pool size from 32kB to 128kB.

The old value was probably fine back in 1998, when that code was imported
(although the comments still mention VAX, which was quite obsolete by then);
now, however, it's too small to handle our libc, which results in some
additional calls to munmap/mmap later on.  Asking for more virtual address
space is virtually free, and syscalls are not, thus the change.

It was suggested by kib@ that this might be a symptom of a deeper problem.
It doesn't only affect libc, though - the change also improves rtld memory
management for eg KDE libraries.  I guess it's just a natural bloat.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12834
This commit is contained in:
trasz 2017-11-18 13:21:22 +00:00
parent 07b985deec
commit 9bb62d136f

View File

@ -61,7 +61,7 @@ static int findbucket();
/*
* Pre-allocate mmap'ed pages
*/
#define NPOOLPAGES (32*1024/pagesz)
#define NPOOLPAGES (128*1024/pagesz)
static caddr_t pagepool_start, pagepool_end;
static int morepages();