【发布时间】:2013-11-14 00:26:46
【问题描述】:
我发现在 linux 3.0+ 上 GFP_ZERO 不再在 headers 中定义。
我在 gfp.h 中发现的只是,
/* Plain integer GFP bitmasks. Do not use this directly. */
...
#define ___GFP_ZERO 0x8000u
我已经检查了那些“导出”的位掩码,其中一个使用 GFP_ZERO。
而且作者说Do not use this directly,那么,我应该如何将页面归零,
kmalloc + memset 是我现在唯一的选择吗?
【问题讨论】:
标签: memory linux-kernel kmalloc