QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1086|回复: 1

阅读代码中的疑问,请大虾解答

[复制链接]
发表于 2003-5-30 22:56:28 | 显示全部楼层 |阅读模式
LINUX内核源代码情景分析(上)中51页讲find_vma()函数。其中在AVL树搜索中假如有这样一个AVL树
                   o
                  /  \
                 o   o
假设给定的逻辑地址不在这三个块中,且是低地址。这时返回的vma地址好像不为NULL,而是最接近它的那个vma地址,是否find_vma()函数有问题?还是我读代码的问题?问题在哪?请大虾指教!!!
发表于 2003-5-31 00:07:34 | 显示全部楼层
/* Look up the first VMA which satisfies  addr < 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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-29 13:18 , Processed in 0.314538 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表