kmem_cache_create
时间:2009-06-02 来源:pop_zhang
struct kmem_cache *
kmem_cache_create (const char *name, size_t size, size_t align,
unsigned long flags, void (*ctor)(void*, struct kmem_cache *, unsigned long),
void (*dtor)(void*, struct kmem_cache *, unsigned long))
该函数用于创建Slab缓存。
参数介绍:
name: 缓存名字
size: 对象的大小
align:对齐
flag:Slab标志位
ctor:对象构造函数
dtor:对象析构函数
kmem_cache_create (const char *name, size_t size, size_t align,
unsigned long flags, void (*ctor)(void*, struct kmem_cache *, unsigned long),
void (*dtor)(void*, struct kmem_cache *, unsigned long))
该函数用于创建Slab缓存。
参数介绍:
name: 缓存名字
size: 对象的大小
align:对齐
flag:Slab标志位
ctor:对象构造函数
dtor:对象析构函数
相关阅读 更多 +