On 14 December 2011 12:04, Paul Brook <p...@codesourcery.com> wrote: >> The proper solution would be to rewrite mmap.c to be smarter (perhaps >> by looking at /proc/self/maps and reserving a lot of space with PROT_NONE >> mappings at startup and then managing it itself), but so far nobody's >> done that > > Yes they have. That's what -R does.
-R doesn't happen by default, it requires you to specify how much you want, and it insists that the space all be in one chunk. > We used to try and parse /proc/self/maps. This caused more problems than it > solved. It doesn't cover things like mmap_min_addr, and you have to re-parse > it before every allocation in case the host libc allocated something new in > between. If you've used a PROT_NONE mapping to claim the space at startup, host libc doesn't override that mapping, does it? -- PMM