LInux Kernel API查找vma对应的虚拟地址
发布时间:2020-12-13 23:03:39 所属栏目:Linux 来源:网络整理
导读:是否有任何内核API可以找到VMA对应的??虚拟地址? 示例:如果a的地址为0x13000,我需要一些如下所示的功能 struct vm_area_struct *vma = vma_corresponds_to (0x13000,task); 解决方法 你正在linux / mm.h中寻找find_vma. /* Look up the first VMA which sa
是否有任何内核API可以找到VMA对应的??虚拟地址?
示例:如果a的地址为0x13000,我需要一些如下所示的功能 struct vm_area_struct *vma = vma_corresponds_to (0x13000,task); 解决方法
你正在linux / mm.h中寻找find_vma.
/* Look up the first VMA which satisfies addr < vm_end,NULL if none. */ extern struct vm_area_struct * find_vma(struct mm_struct * mm,unsigned long addr); 这应该做的伎俩: struct vm_area_struct *vma = find_vma(task->mm,0x13000); if (vma == NULL) return -EFAULT; if (0x13000 >= vma->vm_end) return -EFAULT; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – Jenkins SSH slave无法创建/ home // jenkins
- redhat – 使用Puppet安装软件“捆绑”
- linux – CGroups内存限制不起作用
- linux – lsync,unison或其他一些inotify自动同步工具..?
- 如何卸载Python2.6
- linux – 如何使用此名称“-2”(以连字符开头)进入cd目录?
- linux – 如何为RPM包卸载新安装的依赖项?
- linux – 什么时候调用setsockopt?在bind()和connect()之前
- linux – curl命令不在bash中通过shell脚本执行
- linux – 操作系统可以重启一个陷入无限循环的进程吗?
推荐文章
站长推荐
热点阅读