linux-4.4.1/get_order()(gen)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#o91f5cd0]
#backlinks
*説明 [#me69d31d]
-パス: [[linux-4.4.1/include/asm-generic/getorder.h]]
-FIXME: これは何?
--説明
**引数 [#ge65fa8d]
-unsigned long n
--
**返り値 [#a010eee4]
-int
--
**参考 [#d62bcd7a]
*実装 [#a1e32e86]
/**
* get_order - Determine the allocation order of a memor...
* @size: The size for which to get the order
*
* Determine the allocation order of a particular sized ...
* is on a logarithmic scale, where:
*
* 0 -> 2^0 * PAGE_SIZE and below
* 1 -> 2^1 * PAGE_SIZE to 2^0 * PAGE_SIZE + 1
* 2 -> 2^2 * PAGE_SIZE to 2^1 * PAGE_SIZE + 1
* 3 -> 2^3 * PAGE_SIZE to 2^2 * PAGE_SIZE + 1
* 4 -> 2^4 * PAGE_SIZE to 2^3 * PAGE_SIZE + 1
* ...
*
* The order returned is used to find the smallest alloc...
* to hold an object of the specified size.
*
* The result is undefined if the size is 0.
*
* This function may be used to initialise variables wit...
* evaluations of constants.
*/
#define get_order(n) \
( \
__builtin_constant_p(n) ? ( \
((n) == 0UL) ? BITS_PER_LONG - PAGE_SHIFT : \
(((n) < (1UL << PAGE_SHIFT)) ? 0 : \
ilog2((n) - 1) - PAGE_SHIFT + 1) \
) : \
__get_order(n) \
-
--[[linux-4.4.1/ilog2()]]
--[[linux-4.4.1/__get_order()]]
)
*コメント [#f20c7fed]
終了行:
*参照元 [#o91f5cd0]
#backlinks
*説明 [#me69d31d]
-パス: [[linux-4.4.1/include/asm-generic/getorder.h]]
-FIXME: これは何?
--説明
**引数 [#ge65fa8d]
-unsigned long n
--
**返り値 [#a010eee4]
-int
--
**参考 [#d62bcd7a]
*実装 [#a1e32e86]
/**
* get_order - Determine the allocation order of a memor...
* @size: The size for which to get the order
*
* Determine the allocation order of a particular sized ...
* is on a logarithmic scale, where:
*
* 0 -> 2^0 * PAGE_SIZE and below
* 1 -> 2^1 * PAGE_SIZE to 2^0 * PAGE_SIZE + 1
* 2 -> 2^2 * PAGE_SIZE to 2^1 * PAGE_SIZE + 1
* 3 -> 2^3 * PAGE_SIZE to 2^2 * PAGE_SIZE + 1
* 4 -> 2^4 * PAGE_SIZE to 2^3 * PAGE_SIZE + 1
* ...
*
* The order returned is used to find the smallest alloc...
* to hold an object of the specified size.
*
* The result is undefined if the size is 0.
*
* This function may be used to initialise variables wit...
* evaluations of constants.
*/
#define get_order(n) \
( \
__builtin_constant_p(n) ? ( \
((n) == 0UL) ? BITS_PER_LONG - PAGE_SHIFT : \
(((n) < (1UL << PAGE_SHIFT)) ? 0 : \
ilog2((n) - 1) - PAGE_SHIFT + 1) \
) : \
__get_order(n) \
-
--[[linux-4.4.1/ilog2()]]
--[[linux-4.4.1/__get_order()]]
)
*コメント [#f20c7fed]
ページ名: