Linux Source Learning (7) 2013-3-1

Source: Internet
Author: User
Linux Source Learning (7) 2013-3-1
  • Space

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.