在分析过程中,可以看到大部分时间都花在 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/