linux-2.6.33/kmem_cache_create()(slob)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#uf43b6b9]
#backlinks
*説明 [#e529d20d]
-パス: [[linux-2.6.33/mm/slob.c]]
-FIXME: これは何?
--説明
**引数 [#ifb15b63]
-const char *name
--
-size_t size
--
-size_t align
--
-unsigned long flags
--
-void (*ctor)(void *)
--
**返り値 [#jcfdeccf]
-struct kmem_cache *
--
--[[linux-2.6.33/kmem_cache]]
**参考 [#n58712df]
*実装 [#n295bf0d]
struct kmem_cache *kmem_cache_create(const char *name, s...
size_t align, unsigned long flags, void (*ctor)(void *))
{
struct kmem_cache *c;
c = slob_alloc(sizeof(struct kmem_cache),
GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
-
--[[linux-2.6.33/slob_alloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
-
--[[linux-2.6.33/ARCH_KMALLOC_MINALIGN]]
if (c) {
c->name = name;
c->size = size;
if (flags & SLAB_DESTROY_BY_RCU) {
/* leave room for rcu footer at the end of object */
c->size += sizeof(struct slob_rcu);
}
-
--[[linux-2.6.33/SLAB_DESTROY_BY_RCU]]
-
--[[linux-2.6.33/slob_rcu]]
c->flags = flags;
c->ctor = ctor;
/* ignore alignment unless it's forced */
c->align = (flags & SLAB_HWCACHE_ALIGN) ? SLOB_ALIGN :...
if (c->align < ARCH_SLAB_MINALIGN)
c->align = ARCH_SLAB_MINALIGN;
-
--[[linux-2.6.33/SLAB_HWCACHE_ALIGN]]
-
--[[linux-2.6.33/SLOB_ALIGN]]
-
--[[linux-2.6.33/ARCH_SLAB_MINALIGN]]
if (c->align < align)
c->align = align;
} else if (flags & SLAB_PANIC)
panic("Cannot create slab cache %s\n", name);
-
--[[linux-2.6.33/SLAB_PANIC]]
-
--[[linux-2.6.33/panic()]]
kmemleak_alloc(c, sizeof(struct kmem_cache), 1, GFP_KER...
-
--[[linux-2.6.33/kmemleak_alloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
return c;
}
EXPORT_SYMBOL(kmem_cache_create);
-特にライセンスを区別せずにシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#m0c2a0ce]
終了行:
*参照元 [#uf43b6b9]
#backlinks
*説明 [#e529d20d]
-パス: [[linux-2.6.33/mm/slob.c]]
-FIXME: これは何?
--説明
**引数 [#ifb15b63]
-const char *name
--
-size_t size
--
-size_t align
--
-unsigned long flags
--
-void (*ctor)(void *)
--
**返り値 [#jcfdeccf]
-struct kmem_cache *
--
--[[linux-2.6.33/kmem_cache]]
**参考 [#n58712df]
*実装 [#n295bf0d]
struct kmem_cache *kmem_cache_create(const char *name, s...
size_t align, unsigned long flags, void (*ctor)(void *))
{
struct kmem_cache *c;
c = slob_alloc(sizeof(struct kmem_cache),
GFP_KERNEL, ARCH_KMALLOC_MINALIGN, -1);
-
--[[linux-2.6.33/slob_alloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
-
--[[linux-2.6.33/ARCH_KMALLOC_MINALIGN]]
if (c) {
c->name = name;
c->size = size;
if (flags & SLAB_DESTROY_BY_RCU) {
/* leave room for rcu footer at the end of object */
c->size += sizeof(struct slob_rcu);
}
-
--[[linux-2.6.33/SLAB_DESTROY_BY_RCU]]
-
--[[linux-2.6.33/slob_rcu]]
c->flags = flags;
c->ctor = ctor;
/* ignore alignment unless it's forced */
c->align = (flags & SLAB_HWCACHE_ALIGN) ? SLOB_ALIGN :...
if (c->align < ARCH_SLAB_MINALIGN)
c->align = ARCH_SLAB_MINALIGN;
-
--[[linux-2.6.33/SLAB_HWCACHE_ALIGN]]
-
--[[linux-2.6.33/SLOB_ALIGN]]
-
--[[linux-2.6.33/ARCH_SLAB_MINALIGN]]
if (c->align < align)
c->align = align;
} else if (flags & SLAB_PANIC)
panic("Cannot create slab cache %s\n", name);
-
--[[linux-2.6.33/SLAB_PANIC]]
-
--[[linux-2.6.33/panic()]]
kmemleak_alloc(c, sizeof(struct kmem_cache), 1, GFP_KER...
-
--[[linux-2.6.33/kmemleak_alloc()]]
-
--[[linux-2.6.33/GFP_KERNEL]]
return c;
}
EXPORT_SYMBOL(kmem_cache_create);
-特にライセンスを区別せずにシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#m0c2a0ce]
ページ名: