writeback: split writeback_inodes_wb
[linux-2.6/next.git] / include / linux / slob_def.h
blob62667f72c2ef795c128b58d75a141e65beb16a35
1 #ifndef __LINUX_SLOB_DEF_H
2 #define __LINUX_SLOB_DEF_H
4 #ifndef ARCH_KMALLOC_MINALIGN
5 #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long)
6 #endif
8 #ifndef ARCH_SLAB_MINALIGN
9 #define ARCH_SLAB_MINALIGN __alignof__(unsigned long)
10 #endif
12 void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
14 static __always_inline void *kmem_cache_alloc(struct kmem_cache *cachep,
15 gfp_t flags)
17 return kmem_cache_alloc_node(cachep, flags, -1);
20 void *__kmalloc_node(size_t size, gfp_t flags, int node);
22 static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
24 return __kmalloc_node(size, flags, node);
27 /**
28 * kmalloc - allocate memory
29 * @size: how many bytes of memory are required.
30 * @flags: the type of memory to allocate (see kcalloc).
32 * kmalloc is the normal method of allocating memory
33 * in the kernel.
35 static __always_inline void *kmalloc(size_t size, gfp_t flags)
37 return __kmalloc_node(size, flags, -1);
40 static __always_inline void *__kmalloc(size_t size, gfp_t flags)
42 return kmalloc(size, flags);
45 #endif /* __LINUX_SLOB_DEF_H */