Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/include/linux/slab.h
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static inline void | static inline void | ||||
kfree(const void *ptr) | kfree(const void *ptr) | ||||
{ | { | ||||
free(__DECONST(void *, ptr), M_KMALLOC); | free(__DECONST(void *, ptr), M_KMALLOC); | ||||
} | } | ||||
static inline size_t | |||||
ksize(const void *ptr) | |||||
{ | |||||
return (malloc_usable_size(ptr)); | |||||
} | |||||
extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, | extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name, | ||||
size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); | size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor); | ||||
static inline void * | static inline void * | ||||
linux_kmem_cache_alloc(struct linux_kmem_cache *c, gfp_t flags) | linux_kmem_cache_alloc(struct linux_kmem_cache *c, gfp_t flags) | ||||
{ | { | ||||
return (uma_zalloc_arg(c->cache_zone, c, | return (uma_zalloc_arg(c->cache_zone, c, | ||||
linux_check_m_flags(flags))); | linux_check_m_flags(flags))); | ||||
Show All 23 Lines |