slab.h 597 B

12345678910111213141516171819202122232425262728
  1. #ifndef SLAB_H
  2. #define SLAB_H
  3. #include <linux/types.h>
  4. #define SLAB_HWCACHE_ALIGN 1
  5. #define SLAB_PANIC 2
  6. #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */
  7. static inline int gfpflags_allow_blocking(gfp_t mask)
  8. {
  9. return 1;
  10. }
  11. struct kmem_cache {
  12. int size;
  13. void (*ctor)(void *);
  14. };
  15. void *kmem_cache_alloc(struct kmem_cache *cachep, int flags);
  16. void kmem_cache_free(struct kmem_cache *cachep, void *objp);
  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. #endif /* SLAB_H */