Request for code comments, RB tree for vm_map_findspace()

Venkatesh Srinivas me at
Wed Mar 9 09:13:14 PST 2011

The compare function first keys based on free span length and second on start address of the map entry. This favors low addresses first in searching for KVA holes.I do not implement the start and align arguments to vm_map_findspace(). Advice on how to implement them would be appreciated! Also, I suspect that my _findspace() is not great. It should probably scan down the tree till it finds and exact fit. If it doesn't, it should scan back upwards to the nearest parent. Does that sound better?

Thanks!-- vs

More information about the Kernel mailing list