摘要:
用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);} 阅读全文