Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 2 | #ifndef SLAB_H |
| 3 | #define SLAB_H |
| 4 | |
| 5 | #include <linux/types.h> |
| 6 | |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 7 | #define SLAB_HWCACHE_ALIGN 1 |
| 8 | #define SLAB_PANIC 2 |
| 9 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */ |
| 10 | |
Matthew Wilcox | de1af8f | 2016-12-14 15:09:25 -0800 | [diff] [blame] | 11 | void *kmalloc(size_t size, gfp_t); |
| 12 | void kfree(void *); |
| 13 | |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 14 | void *kmem_cache_alloc(struct kmem_cache *cachep, int flags); |
| 15 | void kmem_cache_free(struct kmem_cache *cachep, void *objp); |
| 16 | |
| 17 | struct kmem_cache * |
| 18 | kmem_cache_create(const char *name, size_t size, size_t offset, |
| 19 | unsigned long flags, void (*ctor)(void *)); |
| 20 | |
| 21 | #endif /* SLAB_H */ |