1 #ifndef __LINUX_SLOB_DEF_H
2 #define __LINUX_SLOB_DEF_H
4 #include <linux/numa.h>
6 void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
8 static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
11 return kmem_cache_alloc_node(cachep, flags, NUMA_NO_NODE);
14 void *__kmalloc_node(size_t size, gfp_t flags, int node);
16 static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
18 return __kmalloc_node(size, flags, node);
22 * kmalloc - allocate memory
23 * @size: how many bytes of memory are required.
24 * @flags: the type of memory to allocate (see kcalloc).
26 * kmalloc is the normal method of allocating memory
29 static __always_inline void *kmalloc(size_t size, gfp_t flags)
31 return __kmalloc_node(size, flags, NUMA_NO_NODE);
34 static __always_inline void *__kmalloc(size_t size, gfp_t flags)
36 return kmalloc(size, flags);
39 #endif /* __LINUX_SLOB_DEF_H */