Kmem cache zalloc
Retired DISLab
http://lxr.free-electrons.com/source/include/linux/slab.h#L628
625 /* 626 * Shortcuts 627 */ 628 static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) 629 { 630 return kmem_cache_alloc(k, flags | __GFP_ZERO); //GFP_ZERO is return zeroed page on success 631 } 3456 /** 3457 * kmem_cache_alloc - Allocate an object 3458 * @cachep: The cache to allocate from. 3459 * @flags: See kmalloc(). 3460 * 3461 * Allocate an object from this cache. The flags are only relevant 3462 * if the cache has no available objects. 3463 */ 3464 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) 3465 { 3466 void *ret = slab_alloc(cachep, flags, _RET_IP_); 3467 3468 trace_kmem_cache_alloc(_RET_IP_, ret, 3469 cachep->object_size, cachep->size, flags); 3470 3471 return ret; 3472 } 3473 EXPORT_SYMBOL(kmem_cache_alloc);