diff options
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r-- | include/linux/slab.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 805ed4b92f9a..9aa90a6f20e0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). | 2 | * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). |
3 | * | 3 | * |
4 | * (C) SGI 2006, Christoph Lameter <clameter@sgi.com> | 4 | * (C) SGI 2006, Christoph Lameter |
5 | * Cleaned up and restructured to ease the addition of alternative | 5 | * Cleaned up and restructured to ease the addition of alternative |
6 | * implementations of SLAB allocators. | 6 | * implementations of SLAB allocators. |
7 | */ | 7 | */ |
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
276 | return kmalloc(size, flags | __GFP_ZERO); | 276 | return kmalloc(size, flags | __GFP_ZERO); |
277 | } | 277 | } |
278 | 278 | ||
279 | /** | ||
280 | * kzalloc_node - allocate zeroed memory from a particular memory node. | ||
281 | * @size: how many bytes of memory are required. | ||
282 | * @flags: the type of memory to allocate (see kmalloc). | ||
283 | * @node: memory node from which to allocate | ||
284 | */ | ||
285 | static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | ||
286 | { | ||
287 | return kmalloc_node(size, flags | __GFP_ZERO, node); | ||
288 | } | ||
289 | |||
279 | #ifdef CONFIG_SLABINFO | 290 | #ifdef CONFIG_SLABINFO |
280 | extern const struct seq_operations slabinfo_op; | 291 | extern const struct seq_operations slabinfo_op; |
281 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | 292 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); |