- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#qe32c7e2]
#backlinks
*説明 [#t1fd9382]
-パス: [[linux-4.4.1/]]
-パス: [[linux-4.4.1/sound/core/memalloc.c]]
-FIXME: これは何?
--説明
**引数 [#r8520e92]
-size_t size
--
-gfp_t gfp_flags
--
--[[linux-4.4.1/gfp_t]]
**返り値 [#fffdc9a4]
-void *
--
**参考 [#n297bc2f]
*実装 [#h8068b8c]
/**
* snd_malloc_pages - allocate pages with the given size
* @size: the size to allocate in bytes
* @gfp_flags: the allocation conditions, GFP_XXX
*
* Allocates the physically contiguous pages with the given size.
*
* Return: The pointer of the buffer, or %NULL if no enough memory.
*/
void *snd_malloc_pages(size_t size, gfp_t gfp_flags)
{
int pg;
if (WARN_ON(!size))
return NULL;
if (WARN_ON(!gfp_flags))
return NULL;
-
--[[linux-4.4.1/WARN_ON()]]
gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */
pg = get_order(size);
return (void *) __get_free_pages(gfp_flags, pg);
-
--[[linux-4.4.1/get_order()]]
--[[linux-4.4.1/__get_free_pages()]]
}
*コメント [#wd4b1c01]