Lines Matching full:flags

23  * Flags to pass to kmem_cache_create().
118 * Ignore user specified debugging flags.
119 * Intended for caches created for self-tests so they have only flags
120 * specified in the code and other flags are ignored.
130 /* The following flags affect the page allocator grouping pages by mobility */
159 unsigned int align, slab_flags_t flags,
163 slab_flags_t flags,
171 * name of the structure and maybe some flags that are listed above.
195 void * __must_check krealloc(const void *objp, size_t new_size, gfp_t flags) __realloc_size(2);
361 static __always_inline enum kmalloc_cache_type kmalloc_type(gfp_t flags) in kmalloc_type() argument
365 * with a single branch for all the relevant flags. in kmalloc_type()
367 if (likely((flags & KMALLOC_NOT_NORMAL_BITS) == 0)) in kmalloc_type()
371 * At least one of the flags has to be set. Their priorities in in kmalloc_type()
377 if (IS_ENABLED(CONFIG_ZONE_DMA) && (flags & __GFP_DMA)) in kmalloc_type()
379 if (!IS_ENABLED(CONFIG_MEMCG_KMEM) || (flags & __GFP_RECLAIMABLE)) in kmalloc_type()
443 void *__kmalloc(size_t size, gfp_t flags) __assume_kmalloc_alignment __alloc_size(1);
444 void *kmem_cache_alloc(struct kmem_cache *s, gfp_t flags) __assume_slab_alignment __malloc;
457 int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p);
468 void *__kmalloc_node(size_t size, gfp_t flags, int node) __assume_kmalloc_alignment
470 void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node) __assume_slab_alignment
473 void *kmalloc_trace(struct kmem_cache *s, gfp_t flags, size_t size)
479 void *kmalloc_large(size_t size, gfp_t flags) __assume_page_alignment
482 void *kmalloc_large_node(size_t size, gfp_t flags, int node) __assume_page_alignment
488 * @flags: the type of memory to allocate.
497 * The @flags argument may be one of the GFP flags defined at
499 * :ref:`Documentation/core-api/mm-api.rst <mm-api-gfp-flags>`
501 * The recommended usage of the @flags is described at
504 * Below is a brief outline of the most useful GFP flags
518 * Also it is possible to set different flags by OR'ing
519 * in one or more of the following additional @flags:
539 static __always_inline __alloc_size(1) void *kmalloc(size_t size, gfp_t flags) in kmalloc() argument
546 return kmalloc_large(size, flags); in kmalloc()
554 kmalloc_caches[kmalloc_type(flags)][index], in kmalloc()
555 flags, size); in kmalloc()
558 return __kmalloc(size, flags); in kmalloc()
562 static __always_inline __alloc_size(1) void *kmalloc_node(size_t size, gfp_t flags, int node) in kmalloc_node() argument
568 return kmalloc_large_node(size, flags, node); in kmalloc_node()
576 kmalloc_caches[kmalloc_type(flags)][index], in kmalloc_node()
577 flags, node, size); in kmalloc_node()
579 return __kmalloc_node(size, flags, node); in kmalloc_node()
582 static __always_inline __alloc_size(1) void *kmalloc_node(size_t size, gfp_t flags, int node) in kmalloc_node() argument
585 return kmalloc_large_node(size, flags, node); in kmalloc_node()
587 return __kmalloc_node(size, flags, node); in kmalloc_node()
595 * @flags: the type of memory to allocate (see kmalloc).
597 static inline __alloc_size(1, 2) void *kmalloc_array(size_t n, size_t size, gfp_t flags) in kmalloc_array() argument
604 return kmalloc(bytes, flags); in kmalloc_array()
605 return __kmalloc(bytes, flags); in kmalloc_array()
613 * @flags: the type of memory to allocate (see kmalloc)
618 gfp_t flags) in krealloc_array() argument
625 return krealloc(p, bytes, flags); in krealloc_array()
632 * @flags: the type of memory to allocate (see kmalloc).
634 static inline __alloc_size(1, 2) void *kcalloc(size_t n, size_t size, gfp_t flags) in kcalloc() argument
636 return kmalloc_array(n, size, flags | __GFP_ZERO); in kcalloc()
639 void *__kmalloc_node_track_caller(size_t size, gfp_t flags, int node,
641 #define kmalloc_node_track_caller(size, flags, node) \ argument
642 __kmalloc_node_track_caller(size, flags, node, \
653 #define kmalloc_track_caller(size, flags) \ argument
654 __kmalloc_node_track_caller(size, flags, \
657 static inline __alloc_size(1, 2) void *kmalloc_array_node(size_t n, size_t size, gfp_t flags, in kmalloc_array_node() argument
665 return kmalloc_node(bytes, flags, node); in kmalloc_array_node()
666 return __kmalloc_node(bytes, flags, node); in kmalloc_array_node()
669 static inline __alloc_size(1, 2) void *kcalloc_node(size_t n, size_t size, gfp_t flags, int node) in kcalloc_node() argument
671 return kmalloc_array_node(n, size, flags | __GFP_ZERO, node); in kcalloc_node()
677 static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) in kmem_cache_zalloc() argument
679 return kmem_cache_alloc(k, flags | __GFP_ZERO); in kmem_cache_zalloc()
685 * @flags: the type of memory to allocate (see kmalloc).
687 static inline __alloc_size(1) void *kzalloc(size_t size, gfp_t flags) in kzalloc() argument
689 return kmalloc(size, flags | __GFP_ZERO); in kzalloc()
695 * @flags: the type of memory to allocate (see kmalloc).
698 static inline __alloc_size(1) void *kzalloc_node(size_t size, gfp_t flags, int node) in kzalloc_node() argument
700 return kmalloc_node(size, flags | __GFP_ZERO, node); in kzalloc_node()
703 extern void *kvmalloc_node(size_t size, gfp_t flags, int node) __alloc_size(1);
704 static inline __alloc_size(1) void *kvmalloc(size_t size, gfp_t flags) in kvmalloc() argument
706 return kvmalloc_node(size, flags, NUMA_NO_NODE); in kvmalloc()
708 static inline __alloc_size(1) void *kvzalloc_node(size_t size, gfp_t flags, int node) in kvzalloc_node() argument
710 return kvmalloc_node(size, flags | __GFP_ZERO, node); in kvzalloc_node()
712 static inline __alloc_size(1) void *kvzalloc(size_t size, gfp_t flags) in kvzalloc() argument
714 return kvmalloc(size, flags | __GFP_ZERO); in kvzalloc()
717 static inline __alloc_size(1, 2) void *kvmalloc_array(size_t n, size_t size, gfp_t flags) in kvmalloc_array() argument
724 return kvmalloc(bytes, flags); in kvmalloc_array()
727 static inline __alloc_size(1, 2) void *kvcalloc(size_t n, size_t size, gfp_t flags) in kvcalloc() argument
729 return kvmalloc_array(n, size, flags | __GFP_ZERO); in kvcalloc()
732 extern void *kvrealloc(const void *p, size_t oldsize, size_t newsize, gfp_t flags)