• 物理页面  
/*
* Try to keep the most commonly accessed fields in single cache lines
* here (16 bytes or greater). This ordering should be particularly
* beneficial on 32-bit processors.
*
* The first line is data used in page cache lookup, the second line
* is used for linear searches (eg. clock algorithm scans).
*/
typedef struct page {
struct list_head list;
struct address_space *mapping;
unsigned long index;
struct page *next_hash;
atomic_t count;
unsigned long flags; /* atomic flags, some possibly updated asynchronously */
struct list_head lru;
unsigned long age;
wait_queue_head_t wait;
struct page **pprev_hash;
struct buffer_head * buffers;
void *virtual; /* non-NULL if kmapped */
struct zone_struct *zone;
} mem_map_t;
  • 虚拟空间
/*
* Linux kernel virtual memory manager primitives.
* The idea being to have a "virtual" mm in the same way
* we have a virtual fs - giving a cleaner interface to the
* mm details, and allowing different kinds of memory mappings
* (from shared memory to executable loading to arbitrary
* mmap() functions).
*/ /*
* This struct defines a memory VMM memory area. There is one of these
* per VM-area/task. A VM area is any part of the process virtual memory
* space that has a special rule for the page-fault handlers (ie a shared
* library, the executable area etc).
*/
struct vm_area_struct {
struct mm_struct * vm_mm; /* VM area parameters */
unsigned long vm_start;
unsigned long vm_end; /* linked list of VM areas per task, sorted by address */
struct vm_area_struct *vm_next; pgprot_t vm_page_prot;
unsigned long vm_flags; /* AVL tree of VM areas per task, sorted by address */
short vm_avl_height;
struct vm_area_struct * vm_avl_left;
struct vm_area_struct * vm_avl_right; /* For areas with an address space and backing store,
* one of the address_space->i_mmap{,shared} lists,
* for shm areas, the list of attaches, otherwise unused.
*/
struct vm_area_struct *vm_next_share;
struct vm_area_struct **vm_pprev_share; struct vm_operations_struct * vm_ops;
unsigned long vm_pgoff; /* offset in PAGE_SIZE units, *not* PAGE_CACHE_SIZE */
struct file * vm_file;
unsigned long vm_raend;
void * vm_private_data; /* was vm_pte (shared mem) */
};
  • 进程用户空间的抽象:mm_struct,一个进程只有一个mm_struct结构,当一个mm_struct结构却可以为多个进程所共享,例如当一个进程创建一个子进程时(vfork或clone),子进程与父进程共享一个mm_struct,
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
struct vm_area_struct * mmap_avl; /* tree of VMAs */
struct vm_area_struct * mmap_cache; /* last find_vma result */
pgd_t * pgd;
atomic_t mm_users; /* How many users with user space? */
atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
int map_count; /* number of VMAs */
struct semaphore mmap_sem;
spinlock_t page_table_lock; struct list_head mmlist; /* List of all active mm's */ unsigned long start_code, end_code, start_data, end_data;
unsigned long start_brk, brk, start_stack;
unsigned long arg_start, arg_end, env_start, env_end;
unsigned long rss, total_vm, locked_vm;
unsigned long def_flags;
unsigned long cpu_vm_mask;
unsigned long swap_cnt; /* number of pages to swap on next pass */
unsigned long swap_address; /* Architecture-specific MM context */
mm_context_t context;
};

最新文章

  1. requests 模块
  2. [Linux] 关于Centos6中ulimit nproc用户进程数的限制
  3. JQuery功能查询页
  4. CNN中的BN
  5. RPI学习--环境搭建_无线网络的连接
  6. AJAX_1
  7. Redis 命令 - Transactions
  8. [记录]使用setTimeout实现不同时间进行切换文本的颜色
  9. logstash 字段类型转换后 需要刷新
  10. Cocos2d-x 如何输出 Android用电话 腰带Tag的Log刊物
  11. Two Sum IV - Input is a BST
  12. 【原创】修复ios输入框获取焦点时不支持fixed的bug
  13. mac 登录亚马逊云服务器报错:Permission denied (publickey).
  14. React Native开发 - 搭建React Native开发环境
  15. 2018-2019-2 20165232《网络对抗技术》Exp1 缓冲区溢出实验
  16. Jenkins pipeline:pipeline 语法详解
  17. UVA 679 二叉树
  18. docker+jenkins+maven简单部署
  19. python 中 类型转换 bytes
  20. mysql服务器设置其他电脑访问

热门文章

  1. static与C#中的static
  2. Struts2配置拦截器,struts2加载常量时的搜索顺序
  3. 《Play for Java》学习笔记(二)基本的CRUD应用
  4. BZOJ1737 [Usaco2005 jan]Naptime 午睡时间
  5. BZOJ3689 异或之
  6. php include
  7. HDU 5763 Another Meaning
  8. Windows API调用外部程序
  9. [转]使用maven镜像
  10. Jquery API Hybrid APP调研