阅读代码中的疑问,请大虾解答
LINUX内核源代码情景分析(上)中51页讲find_vma()函数。其中在AVL树搜索中假如有这样一个AVL树o
/\
o o
假设给定的逻辑地址不在这三个块中,且是低地址。这时返回的vma地址好像不为NULL,而是最接近它的那个vma地址,是否find_vma()函数有问题?还是我读代码的问题?问题在哪?请大虾指教!!! /* Look up the first VMA which satisfiesaddr < vm_end,NULL if none. */
so it return the nearest address as u said. and the code list there is
different with 2.4.20 code. u may try to read 2.4.20 code directly.
and
http://www.csn.ul.ie/~mel/projects/vm/guide/text/understand.txt
http://www.csn.ul.ie/~mel/projects/vm/guide/text/code.txt may help u to
understand it.
页:
[1]