Re: your mail on mmap() to the kernel list

From: Andrea Arcangeli (andrea@suse.de)
Date: Wed Dec 05 2001 - 11:23:23 EST


On Wed, Dec 05, 2001 at 07:12:03PM +0300, Peter Zaitsev wrote:
> I understand it but does it start so search standard way from the low
> addresses or it looks it above the hint address before looking at
> lower addresses ?

mmap(2) with a "valid" hint (so with enough space in the hole between
'start' and 'start+len') runs with O(log(N)) complexity because it uses
the tree internally to verify that's a valid hole. It's only the search
of an hole that has O(N) complexity, the "check" of one hole has just
O(log(N)) complexity.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 07 2001 - 21:00:28 EST