先看看kernel裡的定義:
/** * kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kmalloc). */ static inline void *kzalloc (size_t size, gfp_t flags) { return kmalloc(size, flags | __GFP_ZERO); }
kzalloc實現了kmalloc以及memset的功能,一個函數起到了兩個函數的作用
全站熱搜
留言列表