c - clear_page_c 的作用是什么?

标签 c linux kernel profiling

在分析过程中,可以看到大部分时间都花在 clear_page_c 上,其次是 memset。但是,我不确定 clear_page_c 是什么。

我假设 clear_page_c 将页面中的所有数据设置为 0,但我没有找到任何文档。到目前为止,我发现的最好的事情是引用this link :

The clear_page_c function is more worrying, it is a kernel function related to the control of memory. A web search did not reveal any more information.

最佳答案

您可以阅读源代码来了解它的作用,尽管它是用汇编语言而不是 C 语言编写的。简短的答案是,是的,它用零填充页面。

http://code.woboq.org/linux/linux/arch/x86/lib/clear_page_64.S.html

关于c - clear_page_c 的作用是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23181573/

相关文章:

c - 当剩余内存超过一定大小时,我的自定义 malloc 函数崩溃

比较两个用户输入数组之间的元素?

python - 嵌入python+numpy时延迟加载python DLL

linux - CentOS系统上的gcc版本问题

c++ - typedef函数指针递归

c - 安装了 gmp 但看不到它

linux - 使用 logrotate 每小时轮换文件?

android - 构建 Android 内核时出错 : "multiple target patterns"

Unix V6源代码

c - execv() 贵吗?