#author("2025-10-24T15:55:59+09:00","default:guest","guest")
#author("2025-10-24T16:13:50+09:00","default:guest","guest")
*参照元 [#m5750a2c]
#backlinks

*説明 [#ocf62a35]
-パス: [[linux-5.15/include/linux/mm.h]]

-FIXME: これは何?
--説明
-ページ数(通常は1)を返す。compoundページなら総ページ数を返す。


**引数 [#m875a8bd]
-struct page *page
--
--ページ
--[[linux-5.15/page]]


**返り値 [#la75bca9]
-unsigned long
--
--ページ数


**参考 [#c3ac872c]


*実装 [#gd51bb40]

 /* Returns the number of pages in this potentially compound page. */
 static inline unsigned long compound_nr(struct page *page)
 {
 	if (!PageHead(page))
 		return 1;
 	return page[1].compound_nr;
 }

-
-PG_headフラグが設定されていなければ1、設定されていれば次のページに総ページ数が入っているようだ。
--[[linux-5.15/PageHead()]]


*コメント [#ncdf4e75]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS