Some mmap observations compared to Linux 2.6/OpenBSD

Dan Nelson dnelson at allantgroup.com
Wed Oct 22 07:40:46 PDT 2003


In the last episode (Oct 22), Q said:
> Yes, it would appear this is a legacy thing that existed in the
> original 1994 import of the BSD 4.4 Lite source. Both FreeBSD and
> NetBSD still use this technique, but OpenBSD changed to using
> Red-Black trees back in Feb 2002.
> 
> The actual commit quote reads:
> 
> "use a red-black tree to find entries in the vm_map. augment the
> red-black tree to find free space between entries.  speeds up memory
> allocation, etc..."
> 
> I am wondering if there is a compelling reason why the technique used
> by OpenBSD could not be adapted to FreeBSD's VM system.

Probably just a case of "too much to do and not enough people to do
it".  FreeBSD already has sys/tree.h, which provides the red-black tree
macros.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list