博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
shmid_ds 一个特殊的数据结构
阅读量:4129 次
发布时间:2019-05-25

本文共 536 字,大约阅读时间需要 1 分钟。

内核为每一个共享内存段维护着一个特殊的数据结构,就是shmid_ds,这个结构在include/linux/shm.h中定义
如下:
struct shmid_ds{
      struct ipc_perm shm_perm;/* 操作权限*/
       int shm_segsz;                    /*段的大小(以字节为单位)*/
      time_t shm_atime;          /*最后一个进程附加到该段的时间*/
       time_t shm_dtime;          /*最后一个进程离开该段的时间*/
      time_t shm_ctime;          /*最后一个进程修改该段的时间*/
      unsigned short shm_cpid;   /*创建该段进程的pid*/
       unsigned short shm_lpid;   /*在该段上操作的最后1个进程的pid*/
       short shm_nattch;          /*当前附加到该段的进程的个数*/
/*下面是私有的*/
        unsigned short shm_npages;  /*段的大小(以页为单位)*/
      unsigned long *shm_pages;   /*指向frames->SHMMAX的指针数组*/
      struct vm_area_struct *attaches; /*对共享段的描述*/
};

转载地址:http://trwvi.baihongyu.com/

你可能感兴趣的文章
Ubuntu Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied)
查看>>
collect2: ld returned 1 exit status
查看>>
C#入门
查看>>
C#中ColorDialog需点两次确定才会退出的问题
查看>>
数据库
查看>>
nginx反代 499 502 bad gateway 和timeout
查看>>
linux虚拟机安装tar.gz版jdk步骤详解
查看>>
python实现100以内自然数之和,偶数之和
查看>>
python数字逆序输出及多个print输出在同一行
查看>>
苏宁产品经理面经
查看>>
百度产品经理群面
查看>>
去哪儿一面+平安科技二面+hr面+贝贝一面+二面产品面经
查看>>
element ui 弹窗在IE11中关闭时闪现问题修复
查看>>
vue 遍历对象并动态绑定在下拉列表中
查看>>
Vue动态生成el-checkbox点击无法选中的解决方法
查看>>
python __future__
查看>>
MySQL Tricks1
查看>>
python 变量作用域问题(经典坑)
查看>>
pytorch
查看>>
pytorch(三)
查看>>