Linux physical memory-related data structures

Source: Internet
Author: User

node : pg_data_t

typedefstructpglist_data {zone_t node_zones[max_nr_zones];    zonelist_t Node_zonelists[nr_gfpindex]; structPage *Node_mem_map; unsignedLong*Valid_addr_bitmap; structBootmem_data *bdata; unsignedLongnode_start_paddr; unsignedLongNODE_START_MAPNR; unsignedLongnode_size; intnode_id; structPglist_data *Node_next;} pg_data_t;

All nodes are maintained by the list pgdat_list, all nodes are in the linked list, and the nodes are initialized by the function Init_bootmem_core.

admin area: struct zone_t

typedefstructzone_struct {/** commonly accessed fields:*/spinlock_tLock; unsignedLongoffset; unsignedLongfree_pages; unsignedLonginactive_clean_pages; unsignedLonginactive_dirty_pages; unsignedLongpages_min, Pages_low, Pages_high; /** Free areas of different sizes*/    structList_head inactive_clean_list;    free_area_t Free_area[max_order]; /** Rarely used fields:*/    Char*name; unsignedLongsize; /** Discontig memory support fields. */    structPglist_data *Zone_pgdat; unsignedLongzone_start_paddr; unsignedLongZONE_START_MAPNR; structPage *Zone_mem_map;} zone_t;

Pages: Page

typedefstructPage {structList_head list; structAddress_space *mapping; unsignedLongindex; structPage *Next_hash;    atomic_t count; unsignedLongFlags/*atomic Flags, some possibly updated asynchronously*/    structList_head LRU; unsignedLongAge ;    wait_queue_head_t wait; structPage * *Pprev_hash; structBuffer_head *buffers; void*Virtual;/*Non-null if kmapped*/    structZone_struct *Zone;} mem_map_t;

Linux physical memory-related data structures

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.