Linux Source Learning (7) 2013-3-1
Memory Management MEMORY.C
Mainly used for memory paging management. Enables dynamic allocation and recycling of main memory pages
Linux manages all of the physical pages through a single byte array. Each byte is used to indicate the number of times its corresponding physical page is occupied
1. Invalidate macro: Refreshes the page table data cached by the CPU by re-assigning the CR3 to the hosted method. For page table related property changes
2. Code_space (addr) macro: Determine if addr is in the code snippet of the current process
3. Copy_page (FROM,TO) macro: Copy a page of memory
4. unsigned long get_free_page (void) function: Gets a free physical page that returns the physical page start address
5. Void Free_page (unsigned long addr) function: Releasing a physical page
6. int free_page_tables (unsigned long from,unsigned long size) function: Releases the memory of the size page table sizes corresponding to the linear address from. One page table corresponds to 4 m of memory
7. int copy_page_table (unsigned long from,unsigned to, long size) function: Copies the page catalog table entries and page table entries that specify the linear address and length. Size is byte
Collected in 2013-03-01 from the Baidu space article has a problem? Click here to give us feedback
Linux Source Learning (7) 2013-3-1