linux-2.6.33/__get_vm_area_node()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#fb1507f1]
#backlinks
*説明 [#cfeafcdb]
-パス: [[linux-2.6.33/mm/vmalloc.c]]
-FIXME: これは何?
--説明
**引数 [#pd1df850]
-unsigned long size
--
-unsigned long align
--
-unsigned long flags
--
-unsigned long start
--
-unsigned long end
--
-int node
--
-gfp_t gfp_mask
-
--[[linux-2.6.33/gfp_t]]
-void *caller
--
**返り値 [#k22096aa]
-struct vm_struct *
--
**参考 [#fe65d14b]
*実装 [#h1676bfb]
static struct vm_struct *__get_vm_area_node(unsigned lon...
unsigned long align, unsigned long flags, unsigned lon...
unsigned long end, int node, gfp_t gfp_mask, void *cal...
{
static struct vmap_area *va;
struct vm_struct *area;
-
--[[linux-2.6.33/vmap_area]]
BUG_ON(in_interrupt());
-
--[[linux-2.6.33/BUG_ON()]]
-
--[[linux-2.6.33/in_interrupt()]]
if (flags & VM_IOREMAP) {
int bit = fls(size);
-
--[[linux-2.6.33/VM_IOREMAP]]
-
--[[linux-2.6.33/fls()]]
if (bit > IOREMAP_MAX_ORDER)
bit = IOREMAP_MAX_ORDER;
else if (bit < PAGE_SHIFT)
bit = PAGE_SHIFT;
align = 1ul << bit;
-
--[[linux-2.6.33/IOREMAP_MAX_ORDER]]
-
--[[linux-2.6.33/PAGE_SHIFT]]
}
size = PAGE_ALIGN(size);
if (unlikely(!size))
return NULL;
-
--[[linux-2.6.33/PAGE_ALIGN()]]
-
--[[linux-2.6.33/unlikely()]]
area = kzalloc_node(sizeof(*area), gfp_mask & GFP_RECLA...
if (unlikely(!area))
return NULL;
-
--[[linux-2.6.33/kzalloc_node()]]
-
--[[linux-2.6.33/GFP_RECLAIM_MASK]]
/*
* We always allocate a guard page.
*/
size += PAGE_SIZE;
va = alloc_vmap_area(size, align, start, end, node, gfp...
if (IS_ERR(va)) {
kfree(area);
return NULL;
}
-
--[[linux-2.6.33/alloc_vmap_area()]]
-
--[[linux-2.6.33/IS_ERR()]]
-
--[[linux-2.6.33/kfree()]]
insert_vmalloc_vm(area, va, flags, caller);
return area;
-
--[[linux-2.6.33/insert_vmalloc_vm()]]
}
*コメント [#a3fe7317]
終了行:
*参照元 [#fb1507f1]
#backlinks
*説明 [#cfeafcdb]
-パス: [[linux-2.6.33/mm/vmalloc.c]]
-FIXME: これは何?
--説明
**引数 [#pd1df850]
-unsigned long size
--
-unsigned long align
--
-unsigned long flags
--
-unsigned long start
--
-unsigned long end
--
-int node
--
-gfp_t gfp_mask
-
--[[linux-2.6.33/gfp_t]]
-void *caller
--
**返り値 [#k22096aa]
-struct vm_struct *
--
**参考 [#fe65d14b]
*実装 [#h1676bfb]
static struct vm_struct *__get_vm_area_node(unsigned lon...
unsigned long align, unsigned long flags, unsigned lon...
unsigned long end, int node, gfp_t gfp_mask, void *cal...
{
static struct vmap_area *va;
struct vm_struct *area;
-
--[[linux-2.6.33/vmap_area]]
BUG_ON(in_interrupt());
-
--[[linux-2.6.33/BUG_ON()]]
-
--[[linux-2.6.33/in_interrupt()]]
if (flags & VM_IOREMAP) {
int bit = fls(size);
-
--[[linux-2.6.33/VM_IOREMAP]]
-
--[[linux-2.6.33/fls()]]
if (bit > IOREMAP_MAX_ORDER)
bit = IOREMAP_MAX_ORDER;
else if (bit < PAGE_SHIFT)
bit = PAGE_SHIFT;
align = 1ul << bit;
-
--[[linux-2.6.33/IOREMAP_MAX_ORDER]]
-
--[[linux-2.6.33/PAGE_SHIFT]]
}
size = PAGE_ALIGN(size);
if (unlikely(!size))
return NULL;
-
--[[linux-2.6.33/PAGE_ALIGN()]]
-
--[[linux-2.6.33/unlikely()]]
area = kzalloc_node(sizeof(*area), gfp_mask & GFP_RECLA...
if (unlikely(!area))
return NULL;
-
--[[linux-2.6.33/kzalloc_node()]]
-
--[[linux-2.6.33/GFP_RECLAIM_MASK]]
/*
* We always allocate a guard page.
*/
size += PAGE_SIZE;
va = alloc_vmap_area(size, align, start, end, node, gfp...
if (IS_ERR(va)) {
kfree(area);
return NULL;
}
-
--[[linux-2.6.33/alloc_vmap_area()]]
-
--[[linux-2.6.33/IS_ERR()]]
-
--[[linux-2.6.33/kfree()]]
insert_vmalloc_vm(area, va, flags, caller);
return area;
-
--[[linux-2.6.33/insert_vmalloc_vm()]]
}
*コメント [#a3fe7317]
ページ名: