Konstantin Belousov e474e51e07 Eliminate the static buffer used to read the first page of the mapped
object, and eliminate the pread(2) call as well [1]. Mmap the first
page of the object temporaly, and unmap it on error or last use.
Potentially, this leaves one-page gap between succeeding dlopen(3),
but there are other mmap(2) consumers as well.

Fix several cases were the whole mapping of the object leaked on error.

Use MAP_PREFAULT_READ for mmap(2) calls which map real object pages [2].

Insipired by the patch by:	Ian Lepore <freebsd damnhippie dyndns org> [1]
Suggested by:	alc [2]
MFC after:	2 weeks
2012-06-14 11:20:22 +00:00
..
2012-01-07 16:09:54 +00:00
2012-03-26 15:18:14 +00:00
2012-01-07 16:09:54 +00:00
2012-05-23 20:22:09 +00:00
2012-01-07 16:09:54 +00:00
2010-02-26 09:41:16 +00:00
2010-12-19 13:05:17 +00:00
2012-01-07 16:09:54 +00:00
2009-12-03 15:48:24 +00:00