摘要: 用kzalloc申请内存的时候,效果等同于先是用kmalloc()申请空间,然后用memset()来初始化,所有申请的元素都被初始化为0.view plain/***kzalloc-allocatememory.Thememoryissettozero.*@size:howmanybytesofmemoryarerequired.*@flags:thetypeofmemorytoallocate(seekmalloc).*/staticinlinevoid*kzalloc(size_tsize,gfp_tflags){returnkmalloc(size,flags|__GFP_ZERO);} 阅读全文
posted @ 2013-11-20 20:42 cecwxf 阅读(878) 评论(0) 推荐(0) 编辑