Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page_alloc.c Create Date:2022-07-28 15:03:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This function checks whether a page is free && is the buddy* we can coalesce a page and its buddy if* (a) the buddy is not in a hole (check before calling!) &&* (b) the buddy is in the buddy system &&* (c) a page and its buddy have the same order &&

Proto:static inline int page_is_buddy(struct page *page, struct page *buddy, unsigned int order)

Type:int

Parameter:

TypeParameterName
struct page *page
struct page *buddy
unsigned intorder
797  If page_is_guard(buddy) && page_order(buddy) == order Then
798  If The identification function is mainly used by the buddy allocator for* determining if two pages could be buddies != The identification function is mainly used by the buddy allocator for* determining if two pages could be buddies Then Return 0
801  VM_BUG_ON_PAGE(page_count(buddy) != 0, buddy)
803  Return 1
806  If PageBuddy() indicates that the page is free and in the buddy system* (see mm/page_alloc.c). && page_order(buddy) == order Then
812  If The identification function is mainly used by the buddy allocator for* determining if two pages could be buddies != The identification function is mainly used by the buddy allocator for* determining if two pages could be buddies Then Return 0
815  VM_BUG_ON_PAGE(page_count(buddy) != 0, buddy)
817  Return 1
819  Return 0
Caller
NameDescribe
__free_one_pageFreeing function for a buddy system allocator