ChinaUnix.net
相关文章推荐:

kcalloc

/include/linux/slab.h中定义了常用几个常用的内存分配函数,其中kcalloc的实现代码如下: extern void *kzalloc(size_t, gfp_t); /** * kcalloc - allocate memory for an array. The memory is set to zero. * @n: number of elements. * @size: element size. * @flags: the type of memory to allocate. */ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) { if (n != 0 && size > INT_MAX / n) return NU...

by rocky1972 - 内核源码 - 2007-12-23 09:51:26 阅读(6523) 回复(2)

相关讨论