Re: MemPools rewrite

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 31 Oct 2000 17:49:19 +0100

Andres Kroonmaa wrote:

> no OS limit on amount of mmapped objects? could we mmap all 3G in 4K
> pages without problems?

I think all anonymous mmap() mappings (including data and stack) are
handled more or less equal by the low level vm systems..

> I imagine that OS puts a nonaccessable page between two mmaps to catch
> overruns, so 4K pages would waste VM address-space. But other than that,
> no other problems from OS side?

Linux does not..

and when looking in /proc/sys/maps, all the consecutive mmap():ed
segments are listed as one entry.

> To avoid the overhead, maybe we should mmap() from mempools instead of
> xmalloc? Or is this a very bad idea?

Generally a bad idea. See earlier messages in the thread. Perhaps OK if
optional.

> higher cost of mmap is acceptable with chunked pools, because we use
> the same mmap for very many items, and tearing up/down happens rarely.

Then make the chunks large enought to get mmap()ed in the first place
(either by using large chunks, or tuning malloc())

/Henrik
Received on Tue Oct 31 2000 - 10:34:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:53 MST