Page struct related info in update memlayout.h
This commit is contained in:
parent
6a1b22578e
commit
a0b91ae23f
@ -104,8 +104,8 @@ struct Page {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -107,8 +107,8 @@ struct Page {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -100,16 +100,15 @@ struct e820map {
|
|||||||
struct Page {
|
struct Page {
|
||||||
int ref; // page frame's reference counter
|
int ref; // page frame's reference counter
|
||||||
uint32_t flags; // array of flags that describe the status of the page frame
|
uint32_t flags; // array of flags that describe the status of the page frame
|
||||||
unsigned int property; // used in buddy system, stores the order (the X in 2^X) of the continuous memory block
|
unsigned int property; // the num of free block, used in first fit pm manager
|
||||||
int zone_num; // used in buddy system, the No. of zone which the page belongs to
|
|
||||||
list_entry_t page_link; // free list link
|
list_entry_t page_link; // free list link
|
||||||
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
||||||
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -129,16 +129,15 @@ struct e820map {
|
|||||||
struct Page {
|
struct Page {
|
||||||
int ref; // page frame's reference counter
|
int ref; // page frame's reference counter
|
||||||
uint32_t flags; // array of flags that describe the status of the page frame
|
uint32_t flags; // array of flags that describe the status of the page frame
|
||||||
unsigned int property; // used in buddy system, stores the order (the X in 2^X) of the continuous memory block
|
unsigned int property; // the num of free block, used in first fit pm manager
|
||||||
int zone_num; // used in buddy system, the No. of zone which the page belongs to
|
|
||||||
list_entry_t page_link; // free list link
|
list_entry_t page_link; // free list link
|
||||||
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
||||||
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -129,16 +129,15 @@ struct e820map {
|
|||||||
struct Page {
|
struct Page {
|
||||||
int ref; // page frame's reference counter
|
int ref; // page frame's reference counter
|
||||||
uint32_t flags; // array of flags that describe the status of the page frame
|
uint32_t flags; // array of flags that describe the status of the page frame
|
||||||
unsigned int property; // used in buddy system, stores the order (the X in 2^X) of the continuous memory block
|
unsigned int property; // the num of free block, used in first fit pm manager
|
||||||
int zone_num; // used in buddy system, the No. of zone which the page belongs to
|
|
||||||
list_entry_t page_link; // free list link
|
list_entry_t page_link; // free list link
|
||||||
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
||||||
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -129,16 +129,15 @@ struct e820map {
|
|||||||
struct Page {
|
struct Page {
|
||||||
int ref; // page frame's reference counter
|
int ref; // page frame's reference counter
|
||||||
uint32_t flags; // array of flags that describe the status of the page frame
|
uint32_t flags; // array of flags that describe the status of the page frame
|
||||||
unsigned int property; // used in buddy system, stores the order (the X in 2^X) of the continuous memory block
|
unsigned int property; // the num of free block, used in first fit pm manager
|
||||||
int zone_num; // used in buddy system, the No. of zone which the page belongs to
|
|
||||||
list_entry_t page_link; // free list link
|
list_entry_t page_link; // free list link
|
||||||
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
||||||
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
@ -129,16 +129,15 @@ struct e820map {
|
|||||||
struct Page {
|
struct Page {
|
||||||
int ref; // page frame's reference counter
|
int ref; // page frame's reference counter
|
||||||
uint32_t flags; // array of flags that describe the status of the page frame
|
uint32_t flags; // array of flags that describe the status of the page frame
|
||||||
unsigned int property; // used in buddy system, stores the order (the X in 2^X) of the continuous memory block
|
unsigned int property; // the num of free block, used in first fit pm manager
|
||||||
int zone_num; // used in buddy system, the No. of zone which the page belongs to
|
|
||||||
list_entry_t page_link; // free list link
|
list_entry_t page_link; // free list link
|
||||||
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
list_entry_t pra_page_link; // used for pra (page replace algorithm)
|
||||||
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
uintptr_t pra_vaddr; // used for pra (page replace algorithm)
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags describing the status of a page frame */
|
/* Flags describing the status of a page frame */
|
||||||
#define PG_reserved 0 // the page descriptor is reserved for kernel or unusable
|
#define PG_reserved 0 // if this bit=1: the Page is reserved for kernel, cannot be used in alloc/free_pages; otherwise, this bit=0
|
||||||
#define PG_property 1 // the member 'property' is valid
|
#define PG_property 1 // if this bit=1: the Page is the head page of a free memory block(contains some continuous_addrress pages), and can be used in alloc_pages; if this bit=0: if the Page is the the head page of a free memory block, then this Page and the memory block is alloced. Or this Page isn't the head page.
|
||||||
|
|
||||||
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
#define SetPageReserved(page) set_bit(PG_reserved, &((page)->flags))
|
||||||
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
#define ClearPageReserved(page) clear_bit(PG_reserved, &((page)->flags))
|
||||||
|
Loading…
Reference in New Issue
Block a user