On Wed, 1 May 2002, David Schultz wrote:
> Thus spake Lamont Granquist <[EMAIL PROTECTED]>:
> > Does the FreeBSD VM system do O(1) or O(N) searches for gaps in a
> > processes virtual memory space?
>
> I'm not a VM guru, but if I'm reading vm_map.c right, it's O(n)
> w.r.t. the number of map entries.  But since map entries are merged
> when possible, I would expect the cost to stay fairly low.

I know of one app running on Linux/x86 which spends about 40% of its
kernel time in get_unmapped_pages() (the Linux equivalent).  Trying to
mmap() bits and pieces of 20GB worth of data into a 4GB VM space tends to
lead to a lot of fragmentation.  Be interesting to see if merging would
help, but I'd suggest an O(1) algorithm for this.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to