linux-2.6.33/agp_alloc_page_array()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#cad365d3]
#backlinks
*説明 [#b1c9e4e4]
-パス: [[linux-2.6.33/drivers/char/agp/generic.c]]
-FIXME: これは何?
--説明
**引数 [#mbd86e64]
-size_t size
-確保するメモリの大きさ(バイト単位)
-struct agp_memory *mem
--確保したメモリを返すために使う、AGP メモリ情報のポイン...
--[[linux-2.6.33/agp_memory]]
**返り値 [#bc2442f0]
-なし
**参考 [#i6a3be71]
*実装 [#rdac7e92]
/*
* Use kmalloc if possible for the page list. Otherwise ...
* vmalloc. This speeds things up and also saves memory ...
* regions.
*/
void agp_alloc_page_array(size_t size, struct agp_memory...
{
mem->pages = NULL;
mem->vmalloc_flag = false;
if (size <= 2*PAGE_SIZE)
mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
-確保したいメモリのサイズが 2ページ以下なら kmalloc() で...
--[[linux-2.6.33/kmalloc()]]
--[[linux-2.6.33/GFP_KERNEL]]
--[[linux-2.6.33/__GFP_NORETRY]]
if (mem->pages == NULL) {
mem->pages = vmalloc(size);
mem->vmalloc_flag = true;
}
-kmalloc() が失敗するか、確保したいメモリのサイズが 2ペー...
vmalloc() でメモリを確保する。
--[[linux-2.6.33/vmalloc()]]
}
EXPORT_SYMBOL(agp_alloc_page_array);
-モジュールのライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#a33c3b36]
終了行:
*参照元 [#cad365d3]
#backlinks
*説明 [#b1c9e4e4]
-パス: [[linux-2.6.33/drivers/char/agp/generic.c]]
-FIXME: これは何?
--説明
**引数 [#mbd86e64]
-size_t size
-確保するメモリの大きさ(バイト単位)
-struct agp_memory *mem
--確保したメモリを返すために使う、AGP メモリ情報のポイン...
--[[linux-2.6.33/agp_memory]]
**返り値 [#bc2442f0]
-なし
**参考 [#i6a3be71]
*実装 [#rdac7e92]
/*
* Use kmalloc if possible for the page list. Otherwise ...
* vmalloc. This speeds things up and also saves memory ...
* regions.
*/
void agp_alloc_page_array(size_t size, struct agp_memory...
{
mem->pages = NULL;
mem->vmalloc_flag = false;
if (size <= 2*PAGE_SIZE)
mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
-確保したいメモリのサイズが 2ページ以下なら kmalloc() で...
--[[linux-2.6.33/kmalloc()]]
--[[linux-2.6.33/GFP_KERNEL]]
--[[linux-2.6.33/__GFP_NORETRY]]
if (mem->pages == NULL) {
mem->pages = vmalloc(size);
mem->vmalloc_flag = true;
}
-kmalloc() が失敗するか、確保したいメモリのサイズが 2ペー...
vmalloc() でメモリを確保する。
--[[linux-2.6.33/vmalloc()]]
}
EXPORT_SYMBOL(agp_alloc_page_array);
-モジュールのライセンスに関係なくシンボルを公開する。
--[[linux-2.6.33/EXPORT_SYMBOL()]]
*コメント [#a33c3b36]
ページ名: