Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 1 | #ifndef SLAB_H |
| 2 | #define SLAB_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | |
| 6 | #define GFP_KERNEL 1 |
| 7 | #define SLAB_HWCACHE_ALIGN 1 |
| 8 | #define SLAB_PANIC 2 |
| 9 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */ |
| 10 | |
| 11 | static inline int gfpflags_allow_blocking(gfp_t mask) |
| 12 | { |
| 13 | return 1; |
| 14 | } |
| 15 | |
| 16 | struct kmem_cache { |
| 17 | int size; |
| 18 | void (*ctor)(void *); |
| 19 | }; |
| 20 | |
| 21 | void *kmem_cache_alloc(struct kmem_cache *cachep, int flags); |
| 22 | void kmem_cache_free(struct kmem_cache *cachep, void *objp); |
| 23 | |
| 24 | struct kmem_cache * |
| 25 | kmem_cache_create(const char *name, size_t size, size_t offset, |
| 26 | unsigned long flags, void (*ctor)(void *)); |
| 27 | |
| 28 | #endif /* SLAB_H */ |