This source file includes following definitions.
- kzalloc
1
2 #ifndef SLAB_H
3 #define SLAB_H
4
5 #include <linux/types.h>
6 #include <linux/gfp.h>
7
8 #define SLAB_HWCACHE_ALIGN 1
9 #define SLAB_PANIC 2
10 #define SLAB_RECLAIM_ACCOUNT 0x00020000UL
11
12 void *kmalloc(size_t size, gfp_t);
13 void kfree(void *);
14
15 static inline void *kzalloc(size_t size, gfp_t gfp)
16 {
17 return kmalloc(size, gfp | __GFP_ZERO);
18 }
19
20 void *kmem_cache_alloc(struct kmem_cache *cachep, int flags);
21 void kmem_cache_free(struct kmem_cache *cachep, void *objp);
22
23 struct kmem_cache *
24 kmem_cache_create(const char *name, size_t size, size_t offset,
25 unsigned long flags, void (*ctor)(void *));
26
27 #endif