Lines Matching refs:flags

190 			unsigned int align, slab_flags_t flags,
194 slab_flags_t flags,
226 void * __must_check krealloc(const void *objp, size_t new_size, gfp_t flags) __realloc_size(2);
400 static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags, unsigned long caller) in kmalloc_type() argument
406 if (likely((flags & KMALLOC_NOT_NORMAL_BITS) == 0)) in kmalloc_type()
422 if (IS_ENABLED(CONFIG_ZONE_DMA) && (flags & __GFP_DMA)) in kmalloc_type()
424 if (!IS_ENABLED(CONFIG_MEMCG_KMEM) || (flags & __GFP_RECLAIMABLE)) in kmalloc_type()
487 void *__kmalloc(size_t size, gfp_t flags) __assume_kmalloc_alignment __alloc_size(1);
499 void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags) __assume_slab_alignment __malloc;
512 int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p);
519 void *__kmalloc_node(size_t size, gfp_t flags, int node) __assume_kmalloc_alignment
521 void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node) __assume_slab_alignment
524 void *kmalloc_trace(struct kmem_cache *s, gfp_t flags, size_t size)
530 void *kmalloc_large(size_t size, gfp_t flags) __assume_page_alignment
533 void *kmalloc_large_node(size_t size, gfp_t flags, int node) __assume_page_alignment
590 static __always_inline __alloc_size(1) void *kmalloc(size_t size, gfp_t flags) in kmalloc() argument
596 return kmalloc_large(size, flags); in kmalloc()
600 kmalloc_caches[kmalloc_type(flags, _RET_IP_)][index], in kmalloc()
601 flags, size); in kmalloc()
603 return __kmalloc(size, flags); in kmalloc()
606 static __always_inline __alloc_size(1) void *kmalloc_node(size_t size, gfp_t flags, int node) in kmalloc_node() argument
612 return kmalloc_large_node(size, flags, node); in kmalloc_node()
616 kmalloc_caches[kmalloc_type(flags, _RET_IP_)][index], in kmalloc_node()
617 flags, node, size); in kmalloc_node()
619 return __kmalloc_node(size, flags, node); in kmalloc_node()
628 static inline __alloc_size(1, 2) void *kmalloc_array(size_t n, size_t size, gfp_t flags) in kmalloc_array() argument
635 return kmalloc(bytes, flags); in kmalloc_array()
636 return __kmalloc(bytes, flags); in kmalloc_array()
649 gfp_t flags) in krealloc_array() argument
656 return krealloc(p, bytes, flags); in krealloc_array()
665 static inline __alloc_size(1, 2) void *kcalloc(size_t n, size_t size, gfp_t flags) in kcalloc() argument
667 return kmalloc_array(n, size, flags | __GFP_ZERO); in kcalloc()
670 void *__kmalloc_node_track_caller(size_t size, gfp_t flags, int node,
672 #define kmalloc_node_track_caller(size, flags, node) \ argument
673 __kmalloc_node_track_caller(size, flags, node, \
684 #define kmalloc_track_caller(size, flags) \ argument
685 __kmalloc_node_track_caller(size, flags, \
688 static inline __alloc_size(1, 2) void *kmalloc_array_node(size_t n, size_t size, gfp_t flags, in kmalloc_array_node() argument
696 return kmalloc_node(bytes, flags, node); in kmalloc_array_node()
697 return __kmalloc_node(bytes, flags, node); in kmalloc_array_node()
700 static inline __alloc_size(1, 2) void *kcalloc_node(size_t n, size_t size, gfp_t flags, int node) in kcalloc_node() argument
702 return kmalloc_array_node(n, size, flags | __GFP_ZERO, node); in kcalloc_node()
708 static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) in kmem_cache_zalloc() argument
710 return kmem_cache_alloc(k, flags | __GFP_ZERO); in kmem_cache_zalloc()
718 static inline __alloc_size(1) void *kzalloc(size_t size, gfp_t flags) in kzalloc() argument
720 return kmalloc(size, flags | __GFP_ZERO); in kzalloc()
729 static inline __alloc_size(1) void *kzalloc_node(size_t size, gfp_t flags, int node) in kzalloc_node() argument
731 return kmalloc_node(size, flags | __GFP_ZERO, node); in kzalloc_node()
734 extern void *kvmalloc_node(size_t size, gfp_t flags, int node) __alloc_size(1);
735 static inline __alloc_size(1) void *kvmalloc(size_t size, gfp_t flags) in kvmalloc() argument
737 return kvmalloc_node(size, flags, NUMA_NO_NODE); in kvmalloc()
739 static inline __alloc_size(1) void *kvzalloc_node(size_t size, gfp_t flags, int node) in kvzalloc_node() argument
741 return kvmalloc_node(size, flags | __GFP_ZERO, node); in kvzalloc_node()
743 static inline __alloc_size(1) void *kvzalloc(size_t size, gfp_t flags) in kvzalloc() argument
745 return kvmalloc(size, flags | __GFP_ZERO); in kvzalloc()
748 static inline __alloc_size(1, 2) void *kvmalloc_array(size_t n, size_t size, gfp_t flags) in kvmalloc_array() argument
755 return kvmalloc(bytes, flags); in kvmalloc_array()
758 static inline __alloc_size(1, 2) void *kvcalloc(size_t n, size_t size, gfp_t flags) in kvcalloc() argument
760 return kvmalloc_array(n, size, flags | __GFP_ZERO); in kvcalloc()
763 extern void *kvrealloc(const void *p, size_t oldsize, size_t newsize, gfp_t flags)